Swig Test
swig/swig
Run SWIG test suite for specific languages. An agent skill from swig/swig.
Apply when extracting code from a large monolith file into submodules.
$ npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ZaxbyHub/opencode-swarm safe-extraction --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/generated/safe-extraction .claude/skills/safe-extraction && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "safe-extraction" agent skill from https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/safe-extraction into .claude/skills/safe-extraction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "safe-extraction", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/safe-extractionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ZaxbyHub/opencode-swarm safe-extraction --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.opencode/skills/generated/safe-extraction .agents/skills/safe-extraction && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "safe-extraction" agent skill from https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/safe-extraction into .agents/skills/safe-extraction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "safe-extraction", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ZaxbyHub/opencode-swarm safe-extraction --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.opencode/skills/generated/safe-extraction .cursor/skills/safe-extraction && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "safe-extraction" agent skill from https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/safe-extraction into .cursor/skills/safe-extraction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "safe-extraction", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ZaxbyHub/opencode-swarm.git --path .opencode/skills/generated/safe-extraction--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ZaxbyHub/opencode-swarm safe-extraction --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.opencode/skills/generated/safe-extraction .gemini/skills/safe-extraction && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "safe-extraction" agent skill from https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/safe-extraction into .gemini/skills/safe-extraction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "safe-extraction", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ZaxbyHub/opencode-swarm safe-extractionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm.git skills-src && mkdir -p .github/skills && cp -r skills-src/.opencode/skills/generated/safe-extraction .github/skills/safe-extraction && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "safe-extraction" agent skill from https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/safe-extraction into .github/skills/safe-extraction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "safe-extraction", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ZaxbyHub/opencode-swarm safe-extraction --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.opencode/skills/generated/safe-extraction .opencode/skills/safe-extraction && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "safe-extraction" agent skill from https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/safe-extraction into .opencode/skills/safe-extraction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "safe-extraction", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
safe-extractionApply when extracting code from a large monolith file into submodules.
Safe Extraction is an agent skill from ZaxbyHub/opencode-swarm. Apply when extracting code from a large monolith file into submodules. Covers barrel re-exports, internals DI seam proxy patterns, CI invariant allowlist updates, and cross-file test verification. Prevents CI failures, broken imports, and test regressions from code extraction.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.
It sits in Testing & QA, covering Failing and flaky tests. The repository describes itself as: Architect-centric agentic swarm plugin for OpenCode. Hub-and-spoke orchestration with SME consultation, code generation, and QA review. The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit b63a4bd. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
bunFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Safe Extraction loads about 2.6k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 919 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ZaxbyHub/opencode-swarm at commit b63a4bd, republished under its MIT licence (© ZaxbyHub). 919 words, ~2,584 tokens.
.claude/skills/safe-extraction/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Follow every step in order. Do not skip steps.
Benefit: Prevents the three most common extraction failure modes:
Before moving ANY code, inventory every path-scoped artifact that references the source file:
grep -rn "<source-file-path>" scripts/ .github/workflows/Check:
LEGACY_EXEMPTS arrays (e.g., check-invariants.sh)grep -rn "<source-file-path>" scripts/mock-allowlist.txtgrep -rln "from.*<source-module>" src/ tests/ --include="*.test.ts"
grep -rln "vi.spyOn.*<source-module>" src/ tests/ --include="*.test.ts"
grep -rln "_internals.*<source-module>" src/ tests/ --include="*.test.ts"Record EVERY test file that imports or spies on the source module. These must all pass after extraction.
Prefer the imports tool or repo_map action for comprehensive consumer discovery. Grep catches direct string matches but misses require() imports, dynamic import(), and re-exports through intermediate modules. Use grep as a secondary cross-check.
Use the imports tool or repo_map to find all consumers of exports from the source file.If consumers import from the original path, keep the original file as a barrel:
// src/hooks/guardrails.ts (barrel — preserves import path)
// Use EXPLICIT named exports, not `export *`, to avoid naming conflicts
// when multiple submodules export symbols with the same name.
export {
_internals,
createGuardrailsHooks,
enforceSpecDriftGate,
} from './guardrails/index';
export {
buildEffectiveRules,
checkFileAuthority,
getGlobMatcher,
} from './guardrails/file-authority';
export {
createToolBeforeHandler,
normalizeToolInput,
} from './guardrails/tool-before';
// etc.Verify: bun run build succeeds. All existing imports still resolve.
If the source module exports _internals for test injection:
Functions that remain in the source file stay as direct entries:
export const _internals = {
resolveEvidenceTaskId, // still in this file
loadPlanJsonOnly, // still in this file
// ...
};Functions moved to the extracted module need proxy entries so test mocks propagate:
import { _internals as _extractedInternals } from './extracted-module';
export const _internals = {
resolveEvidenceTaskId, // direct
get extractedFn() {
return _extractedInternals.extractedFn; // proxy to extracted module
},
set extractedFn(v) {
_extractedInternals.extractedFn = v; // allow test injection
},
};The extracted module must ALSO export its own _internals:
// extracted-module.ts
export const _internals = {
extractedFn,
otherExtractedFn,
};Type annotation: Always include an explicit type annotation on _internals objects to override as const readonly inference. Without it, as const makes properties readonly and test injection (_internals.fn = mockFn) fails at compile time:
// GOOD — explicit type annotation allows mutation
export const _internals: {
extractedFn: typeof extractedFn;
otherFn: typeof otherFn;
} = {
extractedFn,
otherFn,
};CRITICAL: The extracted module's own production code must call mockable functions through _internals.fn(...), NOT through the direct function reference. If extractedFn internally calls otherExtractedFn, it must use _internals.otherExtractedFn() — otherwise test mocks set on _internals won't intercept the internal call. This is the same pattern the parent module follows.
Verify: Run ALL test files from Step 0c — not just the one explicitly in scope.
When splitting a factory function into handler files (NOT extracting a subsystem with its own _internals), the getter/setter proxy is unnecessary. Instead:
// guardrails/tool-before.ts — handler file
export function createToolBeforeHandler(cfg: Config, deps: Deps) {
// Receives all dependencies as parameters — no _internals needed
return function toolBefore(input: ToolInput) {
/* handler logic using cfg and deps */
};
}
// guardrails/index.ts — orchestrator
export function createGuardrailsHooks(config: PluginConfig) {
const cfg = resolveConfig(config);
return {
toolBefore: createToolBeforeHandler(cfg, deps),
// ...
};
}Use this pattern when:
Use the _internals proxy pattern (3b) when:
_internals for test injectionFor EVERY path-scoped artifact found in Step 0a, add the new file paths:
# Example: check-invariants.sh
LEGACY_EXEMPTS=(
"src/hooks/guardrails.ts" # original (still exists as barrel)
"src/hooks/guardrails/file-authority.ts" # NEW
"src/hooks/guardrails/helpers.ts" # NEW
"src/hooks/guardrails/index.ts" # NEW
)Verify: Run the invariant check script locally if possible (bash on Windows may require WSL).
File-path moves alter SAST finding fingerprints, making pre-existing findings appear new. After extraction:
sast_scan with capture_baseline: true and the current phase number, including BOTH the old and new file paths in changed_filesbaseline_refresh_rationale (e.g. "file relocation only — content unchanged"): a rename always changes the finding's file identity by design, so post-rename recaptures carry novel findings that must satisfy the absorption gate with an audited rationale — this is intended behavior, not a bugVerify: SAST scan on the new file paths shows only genuinely new findings, not relocated pre-existing ones.
Update any doc references that point to the old monolith for functions that moved:
grep -rn "<source-file-path>" docs/ *.mdFix references to point to the new submodule location.
bun run build succeedsbun run typecheck succeeds (zero new type errors)biome ci . passes| Mistake | Why it fails |
|---|---|
| Forgetting to update LEGACY_EXEMPTS | CI quality job fails on process.cwd() check for new file paths |
| Only testing the explicit test file | Cross-file regressions in OTHER consuming test files go undetected |
| Not creating getter/setter proxies for _internals | Test mocks on the parent module don't propagate to extracted functions |
| Moving helper functions without updating/re-exporting all consumers | Import errors in unrelated files that depended on the helper |
| Updating docs to reference new paths but missing some | Stale doc references confuse future readers |
© ZaxbyHub, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .opencode/skills/generated/safe-extraction of ZaxbyHub/opencode-swarm.
Open the folder on GitHubat commit b63a4bd
Safe Extraction next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Safe Extraction this skillZaxbyHub/opencode-swarm | 494 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Swig Testswig/swig | 6.3k | — | ~2.3k | Automated safety check: Pass | Custom licence | |
| Triage CI FailureDataDog/datadog-agent | 3.8k | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Dynamo Jira TicketDynamoDS/Dynamo | 2k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Fix Ready PRsfastrepl/anarlog | 9.5k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Trx Analysismicrosoft/vstest | 969 | — | ~1.8k | Automated safety check: Pass | MIT |
swig/swig
Run SWIG test suite for specific languages. An agent skill from swig/swig.
DataDog/datadog-agent
Classify a failed CI as either caused by an active incident, flakiness, or a true code regression.
DynamoDS/Dynamo
Create structured Jira tickets for Dynamo from bug reports, failing tests, or feature requests.
fastrepl/anarlog
Inspect every open non-draft PR for CI failures and unresolved Cursor Bugbot findings, then fix them on the existing PR branches.
microsoft/vstest
Parse and analyze Visual Studio TRX test result files. An agent skill from microsoft/vstest.
workersio/skills
Testing workflow skill for finding high-value test candidates, writing focused tests, generating realistic workloads, reviewing test value, and diagnosing test-suite health.
ZaxbyHub/opencode-swarm
Runs an evidence-gated, quote-grounded audit of a codebase for security, QA, accessibility, performance and more, and writes a verified report without changing source files.
ZaxbyHub/opencode-swarm
Drives a bug report from validation and root-cause tracing through a critic-reviewed plan, an approved minimal fix and a PR-ready closure, never merging without recorded human approval.
ZaxbyHub/opencode-swarm
Codex adapter for opencode-swarm that governs commits, pushes, draft PRs, PR body updates and CI closeout, deferring to the repo's canonical commit-pr protocol.
ZaxbyHub/opencode-swarm
Keeps plans, decisions, evidence and reviewer verdicts in small files so long multi-phase tasks survive context compaction and session resumes.
ZaxbyHub/opencode-swarm
Ingests existing pull request feedback such as review comments and CI failures, verifies each claim, fixes confirmed issues and reports closure status for every item.
ZaxbyHub/opencode-swarm
Monitor a pull request after creation and act autonomously on pushed PR activity.
Categories
Apply when extracting code from a large monolith file into submodules. Safe Extraction is an agent skill from ZaxbyHub/opencode-swarm. Apply when extracting code from a large monolith file into submodules.
Safe Extraction fits situations like: tasks that involve Failing and flaky tests.
Run `npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a claude-code`. Or copy the skill folder (.opencode/skills/generated/safe-extraction in ZaxbyHub/opencode-swarm) into .claude/skills/safe-extraction in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a codex`. Or copy the skill folder (.opencode/skills/generated/safe-extraction in ZaxbyHub/opencode-swarm) into .agents/skills/safe-extraction in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZaxbyHub/opencode-swarm --skill safe-extraction -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/safe-extraction, .gemini/skills/safe-extraction, .github/skills/safe-extraction and .opencode/skills/safe-extraction in your project.
Going by SKILL.md and its folder, Safe Extraction needs the command-line tools its instructions call (bun).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Safe Extraction is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Safe Extraction: Swig Test (swig/swig, 6.3k stars), Triage CI Failure (DataDog/datadog-agent, 3.8k stars), Dynamo Jira Ticket (DynamoDS/Dynamo, 2k stars) and Fix Ready PRs (fastrepl/anarlog, 9.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ZaxbyHub (a GitHub organization) maintains it in ZaxbyHub/opencode-swarm, which has 494 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 10, 2026.
Source: ZaxbyHub/opencode-swarm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.