Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

status-audit状态审核

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

494

周安装

21

GitHub Stars

公开资料未说明

下载量

173
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:status-audit(状态审核)
来源仓库:https://github.com/michael-menard/monorepo
仓库路径:skills/status-audit
安装命令:
npx skills add https://github.com/michael-menard/monorepo --skill status-audit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/michael-menard/monorepo --skill status-audit

简介

status-audit 检查知识库与 Git 工作树状态一致性并生成修复清单。

  • 识别旧阶段目录、孤立工作树与延迟写入文件等问题。status-audit 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 适用于 monorepo 项目管理与协作流程规范化。
  • -fix 参数会修改文件系统,操作前务必备份重要数据。
  • 未跟踪工作树不会自动注册,需人工确认是否纳入版本控制。

SKILL.md

/status-audit — Story Status Reconciliation

CRITICAL EXECUTION RULE: Do NOT spawn sub-agents (Task tool) for this skill. Call all MCP tools and Bash commands directly in the main conversation. Sub-agents do not have reliable access to the knowledge-base MCP server.

Usage

/status-audit [--fix] [--epic=platform] [--story=STORY-ID]

Examples:

/status-audit                          # Full audit of all platform stories (report only)
/status-audit --fix                    # Audit + apply all KB corrections
/status-audit --story=KBAR-0040        # Audit a single story
/status-audit --epic=platform --fix    # Audit + fix all platform stories

What It Does

Performs a five-part audit and optionally fixes all detected issues:

SectionWhat It Checks
A. Legacy Stage DirectoriesStories that still exist in old-style stage dirs (backlog/, in-progress/, etc.) — flags for migration to flat stories/ layout
B. KB State MismatchStories in flat stories/ on disk vs KB state field — flags stories on disk not in KB, and vice versa
C. Orphaned WorktreesActive git worktree list entries vs worktree_list_active KB records
D. Deferred KB WritesDEFERRED-KB-WRITES.yaml files on disk that were never processed
E. Artifact SyncKey artifacts on disk (CHECKPOINT.yaml, EVIDENCE.yaml, QA-VERIFY.yaml) vs KB artifact records

Source of truth: The KB is the authoritative source for story state. Filesystem directories are for artifact storage only — status is never inferred from directory location.


Execution Steps

Step 0 — Parse Arguments

Extract --fix flag, --epic (default: platform), --story (optional single story filter).


Step 1 — Git Worktree Scan

Run via Bash tool:

git worktree list

Parse output into a map: {path → branch}. Extract story IDs from branch names matching pattern story/STORY-ID or story/STORY-ID-*.

Example:

/repo/tree/story/KBAR-0050  e2d613a4 [story/KBAR-0050]   → KBAR-0050
/repo/tree/story/WINT-1120  56f9fede [story/WINT-1120]    → WINT-1120

Store as GIT_WORKTREES: {storyId → {path, branch, commit}}


Step 2 — KB Worktree Query

Call MCP tool directly:

mcp__knowledge-base__worktree_list_active({})
→ KB_WORKTREES: { storyId → { path, branch, status } }

If tool fails, set KB_WORKTREES = {} and note in output.


Step 3 — Filesystem Scan

Scan A: Flat stories/ directories (canonical)

Run via Bash tool to find all story directories in the flat layout:

find plans/future/platform -type d \
  -regextype posix-extended \
  -regex '.*/stories/[A-Z]+-[0-9]+$'

For each path found, extract:

  • story_id: last path segment (e.g., KBAR-0040)
  • story_path: full path (e.g., plans/future/platform/wint/stories/KBAR-0040)

Store as DISK_STORIES: {storyId → {story_path}}

Scan B: Legacy stage directories (flag for migration)

Run via Bash tool to find stories still in old-style stage directories:

find plans/future/platform -mindepth 2 -maxdepth 5 -type d \
  -regextype posix-extended \
  -regex '.*/(backlog|created|elaboration|ready-to-work|in-progress|needs-code-review|failed-code-review|ready-for-qa|failed-qa|UAT|completed)/[A-Z]+-[0-9]+$'

For each path found, extract:

  • story_id: last path segment
  • stage_dir: parent directory name
  • legacy_path: full path

Store as LEGACY_STORIES: {storyId → {legacy_path, stage_dir}}. These are flagged in Section A.

If --story flag is set, filter both scans to just that story ID.


Step 4 — KB Story Query

Call MCP tool directly:

mcp__knowledge-base__kb_list_stories({
  epic: "platform",
  limit: 100
})

If result has 100 stories (may be paginated), call again with offset: 100, repeat until exhausted.

Store as KB_STORIES: {storyId → {state, story_dir, priority, blocked}}


Step 5 — Deferred KB Writes Scan

Run via Bash tool:

find plans/future/platform -name "DEFERRED-KB-WRITES.yaml" -type f

For each file found, read the first few lines to extract:

  • deferred_at timestamp
  • reason
  • story_id from the writes array

Store as DEFERRED_WRITES: [{file_path, story_id, deferred_at, reason}]


Step 6 — Artifact Scan

For each story in DISK_STORIES, check for key artifact files in the canonical path and its _implementation/ subdirectory:

# For each canonical_path:
ls {canonical_path}/
ls {canonical_path}/_implementation/ 2>/dev/null

Key artifacts to flag if present on disk:

  • CHECKPOINT.yaml or _implementation/CHECKPOINT.yaml
  • EVIDENCE.yaml or _implementation/EVIDENCE.yaml
  • QA-VERIFY.yaml or _implementation/QA-VERIFY.yaml
  • DEFERRED-KB-WRITES.yaml (already in Step 5, skip here)

Then check KB artifacts:

mcp__knowledge-base__kb_list_artifacts({ story_id: STORY_ID })

Only call kb_list_artifacts for stories that have at least one key artifact on disk and are in DISK_STORIES. Batch these calls — do not call for every story.

Compare disk artifacts vs KB artifact artifact_type values:

  • CHECKPOINT.yaml → type checkpoint
  • EVIDENCE.yaml → type evidence
  • QA-VERIFY.yaml → type qa_gate

Flag stories where disk artifacts exist but no corresponding KB artifact type is found.


Step 7 — Build Report

Section A: Legacy Stage Directories

For each story in LEGACY_STORIES:

STORY-ID  legacy: in-progress/STORY-ID  → needs migration to stories/STORY-ID/

Stories in legacy directories should be manually moved to {FEATURE_DIR}/stories/{STORY_ID}/ and the KB updated accordingly. Run with --fix to update KB state from these directories.

Section B: KB State Mismatches

Compare DISK_STORIES vs KB_STORIES:

  • If story is in DISK_STORIES but NOT in KB_STORIES: flag as Not in KB (on disk, not registered)
  • If story is in KB_STORIES but NOT in DISK_STORIES: flag as No directory (in KB, no story directory)
  • If KB_STORIES[id].story_dir doesn't match the path in DISK_STORIES: flag as Path mismatch

Also include stories from LEGACY_STORIES in KB comparisons — their KB state is preserved but directory needs migration.

Also flag if KB_STORIES[id].story_dir doesn't match the canonical path on disk.

Section C: Orphaned Worktrees

Cross-reference GIT_WORKTREES vs KB_WORKTREES:

  • In git but not in KB → Untracked worktree (git has it, KB doesn't know)
  • In KB but not in git → Orphaned KB record (KB thinks it's active, git worktree is gone)
  • In both → OK (show as healthy)

Section D: Deferred KB Writes

List all DEFERRED-KB-WRITES.yaml files with their age (current date minus deferred_at) and story ID.

Section E: Artifact Sync Gaps

List stories where disk artifacts exist but KB has no corresponding artifact record.


Step 8 — Output Format

═══════════════════════════════════════════════════════
STATUS AUDIT — plans/future/platform
Scanned: {N} stories on disk  |  {M} in KB  |  {date}
═══════════════════════════════════════════════════════

── A. LEGACY STAGE DIRECTORIES ({count} stories) ─────────────────────

  KBAR-0040  legacy: in-progress/KBAR-0040   → migrate to stories/KBAR-0040/
  LNGG-0030  legacy: UAT/LNGG-0030           → migrate to stories/LNGG-0030/
  ...

── B. KB STATE MISMATCHES ({count} stories) ─────────────────────────

  Story       Disk Dir        Disk State    KB State       Action
  ──────────  ──────────────  ────────────  ─────────────  ──────────────
  INFR-0040   UAT/            in_qa         ready_for_qa   UPDATE NEEDED
  KBAR-0020   UAT/            in_qa         ready          UPDATE NEEDED
  LNGG-0040   UAT/            in_qa         (not in KB)    INSERT NEEDED
  WINT-0110   UAT/            in_qa         ready          UPDATE NEEDED
  ...

── C. WORKTREES ({git_count} in git, {kb_count} in KB) ──────────────

  Story       Git Worktree                    KB Record   Status
  ──────────  ──────────────────────────────  ──────────  ───────────────
  KBAR-0050   tree/story/KBAR-0050            ✗ missing   UNTRACKED
  WINT-1120   tree/story/WINT-1120            ✗ missing   UNTRACKED
  WKFL-007    tree/story/WKFL-007             ✗ missing   UNTRACKED
  ...

── D. DEFERRED KB WRITES ({count} files) ────────────────────────────

  File                                              Story      Age     Reason
  ────────────────────────────────────────────────  ─────────  ──────  ──────────────────────────
  UAT/INFR-0040/DEFERRED-KB-WRITES.yaml            INFR-0040  10 days KB tools unavailable in PM
  ...

── E. ARTIFACT SYNC GAPS ({count} stories) ──────────────────────────

  Story       Disk Artifacts                    KB Artifacts   Missing in KB
  ──────────  ────────────────────────────────  ─────────────  ─────────────────
  INFR-0041   CHECKPOINT, EVIDENCE, QA-VERIFY   (none)         checkpoint, evidence, qa_gate
  AUDT-0010   CHECKPOINT, EVIDENCE              checkpoint     evidence
  ...

═══════════════════════════════════════════════════════
SUMMARY
  Legacy stage dirs:   {A_count} stories need migration
  KB state mismatches: {B_count} (updates needed)
  Orphaned worktrees:  {C_count}
  Deferred writes:     {D_count} files
  Artifact gaps:       {E_count} stories

{if --fix}
Applying fixes...
{else}
Run with --fix to apply all KB corrections.
{/if}
═══════════════════════════════════════════════════════

Step 9 — Apply Fixes (only if --fix flag is set)

Apply in this order:

Fix A: Legacy Stage Directories

Legacy stage directories cannot be auto-migrated (requires moving files and potentially active work). Flag as:

⚠ LEGACY directories require manual migration:
  For each story: mv {legacy_path} {FEATURE_DIR}/stories/{STORY_ID}/
  Then update KB story_dir:
    kb_update_story({ story_id, story_dir: "{FEATURE_DIR}/stories/{STORY_ID}" })

List each legacy path for easy access.

Fix B: KB State + story_dir Updates

For each mismatch in Section B:

mcp__knowledge-base__kb_update_story({
  story_id: STORY_ID,
  state: kb_expected_state,
  story_dir: canonical_path
})

For stories not in KB (INSERT NEEDED): use kb_get_story first to confirm absence, then use the appropriate insert tool. If no insert tool is available, flag for manual action.

Fix C: Worktree Records

For UNTRACKED (in git, not in KB): these are legitimate active worktrees — do NOT auto-register since we don't know if they're truly in-progress or abandoned. Instead, flag them with instructions:

⚠ UNTRACKED worktrees require manual verification:
  Run /wt-status to see full worktree health, then
  use /wt-finish or /wt-cleanup to resolve.

For ORPHANED KB records (in KB but not in git): call mcp__knowledge-base__worktree_mark_complete for each.

Fix D: Deferred Writes

These cannot be auto-applied here because the write payloads vary. Instead, output:

⚠ DEFERRED-KB-WRITES.yaml files must be processed manually:
  Run /kb-compress or read each file and apply writes via kb_update_story.

List each file path for easy access.

Fix E: Artifact Sync

Artifact content sync is out of scope for auto-fix (requires reading and re-uploading full file content). Flag as:

⚠ Artifact gaps noted. To sync, run /qa-verify-story or /checkpoint for each affected story,
  which will re-write artifacts to KB as part of normal workflow.

Step 10 — Post-Fix Summary

After applying fixes, show:

Fix Results:
  ✓ {N} KB story_dir paths corrected
  ✓ {N} orphaned worktree KB records marked complete
  ⚠ {N} legacy stage directories need manual migration
  ⚠ {N} untracked worktrees need manual review (/wt-status)
  ⚠ {N} deferred write files need manual processing
  ⚠ {N} artifact gaps need re-verification

Edge Cases

ScenarioBehavior
Legacy story in UAT/ or other stage dirFlagged in Section A as needing migration to stories/ layout
Nested story dir (e.g., stories/KBAR-0020/KBAR-0020)Skip inner dir — it's an artifact folder
Story in git worktree but no active work / clearly abandonedFlag for manual review, don't auto-remove
kb_list_stories paginationKeep calling with increasing offset until total exhausted
Story on disk but --story filter doesn't matchSkip
KB state is completed but story is in a legacy stage dirKB wins — KB is the authoritative source. Flag dir for migration.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.57%
按下载量换算60

Claude

29.47%
按下载量换算51

Cursor

18.94%
按下载量换算33

Gemini CLI

9.11%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/michael-menard/monorepo --skill status-audit 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills