vimalinx/bio-agent / .claude/skills/xcommon-sh
xcommon-sh
VerifiedUse when reading or debugging the shared `xcommon.sh` shell library that supplies local-archive discovery, stdin parsing, and common helper functions to EDirect `x*` scripts.
xcommon-sh
Shared shell library for the newer local-archive x* EDirect scripts. It is not a meaningful standalone CLI; it defines common variables and functions such as ParseStdin, GetUIDs, FindArchiveFolder, FindPostingsFolder, FindDataFolder, DisplayError, and date-constraint normalization.
Quick Start
- File:
/home/vimalinx/miniforge3/envs/bio/bin/xcommon.sh - Typical use: sourced by sibling tools such as
xfetch,xfilter, andxinfo - Not a normal command: direct execution provides no useful interface
When To Use This Tool
- Understanding why
xfetch,xfilter, orxinfobehave the way they do - Debugging local archive/postings path discovery based on
EDIRECT_LOCAL_ARCHIVE - Inspecting shared stdin parsing and UID-normalization logic across the
x*helpers - Auditing common error/warning rendering or
EDIRECT_TRACEbehavior
Common Patterns
# Read the shared helper source
sed -n '1,260p' /home/vimalinx/miniforge3/envs/bio/bin/xcommon.sh
# Grep the library for folder-discovery helpers
rg 'FindArchiveFolder|FindPostingsFolder|FindDataFolder' /home/vimalinx/miniforge3/envs/bio/bin/xcommon.sh
# Source it inside a debugging shell if needed
. /home/vimalinx/miniforge3/envs/bio/bin/xcommon.sh
Recommended Workflow
- Treat
xcommon.shas shared implementation, not as an end-user command. - Read it when a sibling
x*wrapper emits path or stdin-source errors that seem opaque. - Focus first on
FindLocalArchiveFolder,GetUIDs,ParseStdin, and the display helpers. - If tracing is needed, set
EDIRECT_TRACE=truebefore running the higher-level wrapper that sources this file.
Guardrails
- Direct execution is effectively meaningless here:
xcommon.sh -handxcommon.sh --versionproduced no useful output in local testing. - Source inspection shows local path discovery ultimately calls
rchive -local <db> <Archive|Postings|Data|Source>. - If
EDIRECT_LOCAL_ARCHIVEcannot be resolved, the shared helper emitsERROR: Must supply path to local data by setting EDIRECT_LOCAL_ARCHIVE environment variableand exits. GetUIDsnormalizes IDs by splitting on non-alphanumeric/underscore/dot characters and sorting/uniquing the final stream.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |