skill-stocktake
Use when auditing, inventorying, comparing, consolidating, updating, retiring, or checking changes across user, repository, admin, system, or managed Codex skills, especially when activation, overlap, freshness, usage, dependencies, or resumable cached reviews matter.
- License 许可
- MIT
- 最近更新
- 2026-07-07
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- skill-stocktake
- description
- Use when auditing, inventorying, comparing, consolidating, updating, retiring, or checking changes across user, repository, admin, system, or managed Codex skills, especially when activation, overlap, freshness, usage, dependencies, or resumable cached reviews matter.
02 资源文件 50
- 参考文档.github/workflows/test.yml700 B
- 其他.gitignore132 B
- 参考文档agents/openai.yaml219 B
- 参考文档CONTRIBUTING.md636 B
- 参考文档docs/superpowers/plans/2026-07-05-skill-stocktake-v4.md1.4 KB
- 参考文档docs/superpowers/specs/2026-07-05-skill-stocktake-v4-design.md1.7 KB
- 许可证LICENSE1.0 KB
- 其他pyproject.toml396 B
- 参考文档README.md3.8 KB
- 参考文档references/evaluation-rubric.md10.5 KB
- 脚本scripts/Format-Report.ps1725 B
- 脚本scripts/Get-DefaultStatePath.ps1321 B
- 脚本scripts/Get-SkillDiff.ps13.5 KB
- 脚本scripts/New-AuditRun.ps1597 B
- 脚本scripts/Save-Results.ps1549 B
- 脚本scripts/Scan-Skills.ps11.6 KB
- 脚本scripts/SkillStocktake.psm158.4 KB
- 参考文档SECURITY.md908 B
- 脚本skill_stocktake/__init__.py68 B
- 脚本skill_stocktake/__main__.py80 B
- 脚本skill_stocktake/artifacts.py426 B
- 脚本skill_stocktake/cli.py8.5 KB
- 脚本skill_stocktake/discovery.py8.4 KB
- 脚本skill_stocktake/migration.py548 B
- 脚本skill_stocktake/paths.py320 B
- 脚本skill_stocktake/redaction.py906 B
- 脚本skill_stocktake/reporting.py2.0 KB
- 脚本skill_stocktake/security.py2.3 KB
- 脚本skill_stocktake/state.py4.0 KB
- 脚本skill_stocktake/usage.py2.2 KB
- 脚本tests_py/test_cli_workflows.py6.8 KB
- 脚本tests_py/test_filesystem_boundaries.py2.2 KB
- 脚本tests_py/test_pending_parity.py6.6 KB
- 脚本tests_py/test_state_workflows.py1.1 KB
- 脚本tests_py/test_v4_contracts.py3.0 KB
- 其他tests/fixtures/config/disabled-plugin.toml48 B
- 其他tests/fixtures/config/instructions.toml81 B
- 参考文档tests/fixtures/home/.codex/AGENTS.md18 B
- 参考文档tests/fixtures/home/.codex/AGENTS.override.md18 B
- 参考文档tests/fixtures/metadata/folded.md80 B
- 参考文档tests/fixtures/metadata/literal.md82 B
- 参考文档tests/fixtures/metadata/missing-name.md77 B
- 参考文档tests/fixtures/metadata/nested.md184 B
- 参考文档tests/fixtures/plugins/inventory.json171 B
- 参考文档tests/fixtures/plugins/openai-curated-remote/dual/.codex-remote-plugin-install.json41 B
- 参考文档tests/fixtures/project/AGENTS.md22 B
- 参考文档tests/fixtures/project/nested/AGENTS.override.md18 B
- 参考文档tests/fixtures/project/nested/leaf/TEAM_GUIDE.md29 B
- 参考文档tests/fixtures/references/AGENTS.md59 B
- 脚本tests/Run-Tests.ps133.1 KB
03 SKILL.md 正文
Skill Stocktake
Audit skills without changing them. Require explicit approval before rewriting, merging, archiving, or removing an audited skill. Treat admin, system, and managed/plugin skills as read-only.
Prepare
Resolve the installation and project context. ProjectRoot is the repository root; CurrentWorkingDirectory determines nested skill and instruction scope. Prefer the cross-platform Python v4 engine.
$CodexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $HOME '.codex' }
$SkillRoot = Join-Path $CodexHome 'skills\skill-stocktake'
$GitRoot = & git rev-parse --show-toplevel 2>$null
$ProjectRoot = if ($LASTEXITCODE -eq 0 -and -not [string]::IsNullOrWhiteSpace($GitRoot)) { $GitRoot } else { (Get-Location).Path }
$CurrentWorkingDirectory = (Get-Location).Path
$StatePath = powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $SkillRoot 'scripts\Get-DefaultStatePath.ps1') -ProjectRoot $ProjectRoot
Confirm Python 3.10+ is available, then run python -m skill_stocktake doctor from the skill directory. The PowerShell entrypoints remain compatibility paths for v3-era automation.
Always read references/evaluation-rubric.md before assigning verdicts or constructing records.
Build the worklist
$WorkPath = Join-Path (Get-Location) 'skill-stocktake-work.json'
$RunPath = Join-Path (Get-Location) 'skill-stocktake-run.json'
$WorkJson = powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $SkillRoot 'scripts\Get-SkillDiff.ps1') `
-StatePath $StatePath -ProjectRoot $ProjectRoot -CurrentWorkingDirectory $CurrentWorkingDirectory -UsageMode None
[System.IO.File]::WriteAllText($WorkPath, ($WorkJson -join [Environment]::NewLine))
powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $SkillRoot 'scripts\New-AuditRun.ps1') -WorklistPath $WorkPath -OutputPath $RunPath | Out-Null
Session-history analysis requires explicit user approval. Use Python --include-usage or PowerShell -UsageMode Sessions only after approval. Pass additional or symlink roots only when confirmed by the current runtime and explicitly trusted.
The inventory distinguishes confirmed, inferred, disabled, and excluded activation. Never call coverage complete when diagnostics report unreadable roots or inferred managed activation.
Follow suggested_mode:
full: evaluate every logical skill.quick: evaluate onlydiff.pending_idsand carry valid unchanged records forward.resume: continue the exact active run. If inventory or context changed, start a new full run and useSave-Results.ps1 -ReplaceActiveRunfor its first save.
Evaluate
Inspect each selected skill's complete SKILL.md and only the resources needed to validate its claims. Apply every rubric dimension and map evidence to each concern, fail, or unknown dimension.
Verify changing platform claims with primary sources. Check applicable instruction precedence, activation state, metadata, tool dependencies, and reverse references. Treat usage as supporting evidence only; zero or unavailable usage never independently justifies removal.
Evaluate in batches of about 20. Update the run JSON with complete pending/evaluated lists after each batch. Use multiple agents only when the user explicitly requests them; the parent remains the sole state writer.
Save safely
powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $SkillRoot 'scripts\Save-Results.ps1') -StatePath $StatePath -EvaluationPath $RunPath
Schema version 3 validates identity, progress, verdicts, confidence, mapped evidence, proposal fields, freshness, and merge/retirement safeguards. Saving is locked and atomic. Never bypass validation.
Report
powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $SkillRoot 'scripts\Format-Report.ps1') -StatePath $StatePath -WorklistPath $WorkPath
Report coverage and diagnostics first, then summary counts, actionable or low-confidence results, the complete table, proposals, and uncertainty. Separate confirmed runtime facts from cache inference. Do not apply proposals during the audit.
04 同仓库更多 Skills
nested-repo-skill
Use when testing nested repository skill discovery.
project-skill
Use when a project fixture skill applies.
managed-install-temp
Use when installation staging is incorrectly scanned.
managed-local-duplicate
Use when a local curated duplicate is selected incorrectly.
managed-current
Use when the current managed fixture applies.
managed-old
Use when the old managed fixture applies.