[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74WV1YSZX5HS3R924RFP3QP":3,"skill-same:01M74WV1YSZX5HS3R924RFP3QP":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M74WV1YSZX5HS3R924RFP3QP","cleave-scan",null,"phaedrus1992\u002Fllmenv","phaedrus1992","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F22475972?v=4","01M74WTJB2Y3041TQR80DYKMAR","Phaedrus","01M74WTJBSJTG3HBYX6WSS3E0M",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Fexamples\u002Fconfig-llmenv-dir\u002Fbundles\u002Fbase\u002Fskills\u002Fcleave-scan\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"\u003C!-- markdownlint-disable MD003 MD013 MD022 MD041 -->\n---\n\nname: cleave-scan\ndescription: This skill should be used when the user asks to \"run cleave\", \"scan with cleave\", \"cleave this project\", \"check for supply-chain issues\", \"run a security scan\", or \"find malware indicators\". Runs cleave static analysis on a project and files GitHub issues for findings. Uses ICM memory to track the last-scanned git revision per project and uses `cleave diff` on subsequent runs instead of a full scan\n---\n\n# Cleave Scan\n\nRuns `cleave` (`~\u002Fgit\u002Freference\u002Fcleave`) static analysis on a project and creates GitHub issues for notable findings. On first scan: full `cleave analyze`. On repeat scans: `cleave diff` against the last-scanned revision, creating issues only for new or changed findings.\n\nCleave binary location: `~\u002Fgit\u002Freference\u002Fcleave` (built with `cargo build --release`). Check if `cleave` is on PATH first; fall back to `~\u002Fgit\u002Freference\u002Fcleave\u002Ftarget\u002Frelease\u002Fcleave`.\n\n## Step 1 — Update Rules\n\nBefore scanning, ensure traits are current:\n\n```bash\ncleave update-rules\n```\n\n## Step 2 — Resolve Project\n\nDetermine the target path (default: current directory). Derive a canonical project name:\n\n```bash\nPROJECT_PATH=$(git -C \"${TARGET_PATH}\" rev-parse --show-toplevel 2>\u002Fdev\u002Fnull || realpath \"${TARGET_PATH}\")\nPROJECT_NAME=$(basename \"$PROJECT_PATH\")\nCURRENT_REV=$(git -C \"$PROJECT_PATH\" rev-parse HEAD 2>\u002Fdev\u002Fnull || echo \"\")\n```\n\nIf the path is not a git repo, `CURRENT_REV` stays empty — full scan always, no diff.\n\n## Step 3 — Check ICM for Last Scan\n\n```text\nmcp__icm__icm_memory_recall { \"topic\": \"cleave:scan:\u003CPROJECT_NAME>\" }\n```\n\nExpected payload (if previously scanned):\n\n```json\n{\n  \"rev\": \"\u003Cgit-sha>\",\n  \"path\": \"\u003Cproject-path>\",\n  \"scanned_at\": \"\u003CISO8601>\"\n}\n```\n\nIf recall returns nothing or an error → **full scan** (Step 4a).  \nIf recall returns a rev AND the current project is a git repo → **diff scan** (Step 4b).  \nIf recall returns a rev but the current project is not a git repo → **full scan** (Step 4a).\n\n## Step 4a — Full Scan\n\nPass specific source directories to avoid scanning build artifacts (`target\u002F`, `node_modules\u002F`, etc.).\nFor a Rust project, pass `src\u002F`, `crates\u002F`, `.github\u002F`, `scripts\u002F`, `charts\u002F`, `Dockerfile`,\n`Cargo.toml`, `Cargo.lock`, and any domain-specific config files. Check that each path exists first.\n\n```bash\nREPORT=\u002Ftmp\u002Fcleave-scan-${PROJECT_NAME}.json\n\n# Build target list from paths that actually exist\nTARGETS=()\nfor p in \"$PROJECT_PATH\u002Fsrc\" \"$PROJECT_PATH\u002Fcrates\" \"$PROJECT_PATH\u002F.github\" \\\n          \"$PROJECT_PATH\u002Fscripts\" \"$PROJECT_PATH\u002Fcharts\" \"$PROJECT_PATH\u002FDockerfile\" \\\n          \"$PROJECT_PATH\u002FCargo.toml\" \"$PROJECT_PATH\u002FCargo.lock\"; do\n  [ -e \"$p\" ] && TARGETS+=(\"$p\")\ndone\n\n# -o flag is broken in this cleave version; redirect stdout instead\ncleave --format json --no-update-check \"${TARGETS[@]}\" > \"$REPORT\" 2>\u002Ftmp\u002Fcleave-stderr.log\n```\n\nParse findings (see Step 5). All findings with `crit >= 3` are candidates for issues.\n\n## Step 4b — Diff Scan\n\nUse `git worktree` to create a clean checkout of the baseline revision, run `cleave diff`, then remove the worktree.\n\n```bash\nBASELINE_DIR=\u002Ftmp\u002Fcleave-baseline-${PROJECT_NAME}\nREPORT=\u002Ftmp\u002Fcleave-diff-${PROJECT_NAME}.json\n\n# Clean up any stale worktree from a previous interrupted run\ngit -C \"$PROJECT_PATH\" worktree remove --force \"$BASELINE_DIR\" 2>\u002Fdev\u002Fnull || true\nrm -rf \"$BASELINE_DIR\"\n\ngit -C \"$PROJECT_PATH\" worktree add \"$BASELINE_DIR\" \"$LAST_REV\"\n# -o flag is broken in this cleave version; redirect stdout instead\ncleave --format json --no-update-check diff \"$BASELINE_DIR\" \"$PROJECT_PATH\" > \"$REPORT\" 2>\u002Ftmp\u002Fcleave-stderr.log\ngit -C \"$PROJECT_PATH\" worktree remove --force \"$BASELINE_DIR\"\nrm -rf \"$BASELINE_DIR\"\n```\n\nParse findings (see Step 4). Only findings in `.diff.findings.added[]` with `crit >= 3` are candidates. Changed findings (`.diff.findings.changed[]`) are candidates if the new criticality is >= 3.\n\n## Step 5 — Parse Findings\n\n**Important:** `--format json` outputs one JSON object per analyzed file, concatenated without\nnewlines (effectively a stream). Use `jq -s` (slurp) to collect all objects and query across them.\nFindings live in `.files[].traits[]`, not `.findings[]`.\n\nFor full scans:\n\n```bash\n# Count by criticality\njq -s '[.[].files[].traits[]? | select(.crit >= 3)] | group_by(.crit) | map({crit: .[0].crit, count: length})' \"$REPORT\"\n\n# Extract actionable findings with file context\njq -s '[.[].files[] | {file: .path, traits: [.traits[]? | select(.crit >= 3)]} | select(.traits | length > 0)]' \"$REPORT\"\n```\n\nFor diff scans (the diff shape matches the schema reference — `.diff.findings.added[]` etc.):\n\n```bash\njq -s '[.[].diff.findings.added[]? | select(.crit >= 3)],\n       [.[].diff.findings.changed[]?.new | select(.crit >= 3)]' \"$REPORT\"\n```\n\nCriticality reference:\n\n- `3` = Notable — defines program purpose, flagged in diffs\n- `4` = Suspicious — unusual or evasive, investigate\n- `5` = Hostile — almost certainly malicious\n\n## Step 6 — Triage: Verify Before Filing\n\n**Do not create an issue until you have verified the finding is a genuine concern.**\n\nFor each crit ≥ 4 finding (and any crit 3 from a diff):\n\n1. Read the flagged file at the evidence location.\n2. Determine whether the behavior is expected given the project's purpose.\n3. Classify as one of:\n   - **Confirmed** — the code does something unexpectedly hostile; file an issue.\n   - **Uncertain** — the context is ambiguous; file an issue with the ambiguity noted.\n   - **False positive** — the behavior is intentional and benign; skip, mention in summary only.\n\nCommon false positive patterns to recognize and skip:\n\n- `cargo-path-rat-topic` triggered by workspace path deps (`path = \"..\u002F...\"`) in a Rust monorepo — expected.\n- SSH\u002Fauthorized_keys chown\u002Fchmod in a bastion or deployment operator — expected infra management.\n- `exec`\u002F`process create` calls in a CLI or operator codebase that intentionally spawns subprocesses.\n- Helm\u002FKubernetes RBAC verbs (`create`, `delete`, `patch`) in chart templates — expected.\n\nIf uncertain, read surrounding context (function, module, test) before deciding. A high confidence\nscore (≥ 0.9) on a crit 5 finding warrants filing even if context is mostly benign.\n\n## Step 7 — Deduplicate Against Existing Issues\n\nBefore creating any issue, search for existing issues with the finding ID to avoid duplicates:\n\n```bash\ngh issue list --search \"cleave: \u003Cfinding-id>\" --state all --json number,title --limit 5\n```\n\nIf an open issue already exists for a finding, skip it. If a closed issue exists, reopen it with a comment noting the re-detection and current rev.\n\n## Step 8 — Create GitHub Issues\n\nOnly create an issue for findings classified **Confirmed** or **Uncertain** in Step 6.\nFalse positives are skipped and noted in the Step 9 summary only.\n\nFor each verified finding without an existing open issue:\n\n```bash\ngh issue create \\\n  --title \"cleave: \u003Cfinding.id>\" \\\n  --label \"cleave\" \\\n  --body \"$(cat \u003C\u003C'EOF'\n## Cleave Finding\n\n**ID:** `\u003Cfinding.id>`  \n**Kind:** \u003Cfinding.kind>  \n**Criticality:** \u003Ccrit-name> (\u003Cfinding.crit>\u002F5)  \n**Confidence:** \u003Cfinding.conf>\n\n\u003Cfinding.desc>\n\n---\n\n**Scanned rev:** `\u003CCURRENT_REV>`  \n**Path:** `\u003CPROJECT_PATH>`  \n\u003Cif mbc>**MBC:** `\u003Cfinding.mbc>`\u003Cendif>  \n\u003Cif attack>**ATT&CK:** `\u003Cfinding.attack>`\u003Cendif>\n\n\u003Cevidence section if present>\nEOF\n)\"\n```\n\nCriticality names for the body: 3=Notable, 4=Suspicious, 5=Hostile.\n\n**Evidence section** (include when `finding.evidence` is non-empty):\n\n```markdown\n### Evidence\n\u003Cfor each evidence item: file path, offset\u002Fline, matched string or description>\n```\n\nCreate issues one at a time. After each, confirm the issue number and URL before proceeding to the next. If `gh issue create` fails (e.g., no GitHub remote, not authenticated), report the findings in the conversation instead.\n\n**Labels:** Create the `cleave` label if missing:\n\n```bash\ngh label create cleave --color \"D93F0B\" --description \"Cleave static analysis finding\" 2>\u002Fdev\u002Fnull || true\n```\n\n## Step 9 — Update ICM Memory\n\nAfter all issues are created (or attempted), store the current scan state:\n\n```text\nmcp__icm__icm_memory_store {\n  \"topic\": \"cleave:scan:\u003CPROJECT_NAME>\",\n  \"content\": \"{\\\"rev\\\": \\\"\u003CCURRENT_REV>\\\", \\\"path\\\": \\\"\u003CPROJECT_PATH>\\\", \\\"scanned_at\\\": \\\"\u003CISO8601-UTC>\\\"}\"\n}\n```\n\nIf no git rev exists (non-git directory), skip this step — the next run will always be a full scan.\n\n## Step 10 — Report Summary\n\nAfter completing, summarize:\n\n- Scan type (full or diff vs `\u003Cshort-rev>`)\n- Total findings parsed, count by criticality\n- Triage breakdown: N confirmed, N uncertain, N false positives (with brief FP reason for each)\n- Issues created (with numbers\u002FURLs)\n- Issues skipped (already exist)\n\n## Error Handling\n\n- **cleave not found:** Try `~\u002Fgit\u002Freference\u002Fcleave\u002Ftarget\u002Frelease\u002Fcleave`. If missing, run `cargo build --release` in `~\u002Fgit\u002Freference\u002Fcleave` first.\n- **Git worktree failure:** If the old rev no longer exists (e.g., force-pushed history), fall back to a full scan and note it in the summary.\n- **No GitHub remote:** Skip issue creation, print all findings to the conversation.\n- **JSON parse errors:** Fall back to `--format tiny` (also a top-level flag: `cleave --format tiny --no-update-check PATHS... > report.txt`) and parse findings line-by-line for manual review.\n- **`-o` flag:** Broken in v2.1.1 — always redirect stdout (`> \"$REPORT\"`) instead of using `-o`.\n- **Scanning too slow \u002F huge output:** Do NOT pass the repo root — pass specific source dirs to avoid build artifacts (`target\u002F`, `node_modules\u002F`, etc.) which can be hundreds of MB and contain false positives.\n\n## Additional Resources\n\n- **`references\u002Fjson-schema.md`** — Cleave JSON output schema reference (Finding, Criticality, diff shape)\n",{},"main","2ccf515b8e8251dfd0392546073a1baaf42e79cf","examples\u002Fconfig-llmenv-dir\u002Fbundles\u002Fbase\u002Fskills\u002Fcleave-scan",1,"https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv","https:\u002F\u002Fgithub.com\u002Fphaedrus1992","2026-11-15 01:43:22",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add phaedrus1992\u002Fllmenv --skill cleave-scan",{"tool":35,"command":36},"bunx","bunx skills add phaedrus1992\u002Fllmenv --skill cleave-scan",{"tool":38,"command":39},"pnpm","pnpm dlx skills add phaedrus1992\u002Fllmenv --skill cleave-scan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Fexamples\u002Fconfig-llmenv-dir\u002Fbundles\u002Fbase\u002Fskills\u002Fcleave-scan\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"references\u002Fjson-schema.md","REFERENCE","参考文档",4076,"https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Fexamples\u002Fconfig-llmenv-dir\u002Fbundles\u002Fbase\u002Fskills\u002Fcleave-scan\u002Freferences\u002Fjson-schema.md",[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":18},"01M74WW2BKBJSM8QS9BAEYMC24","clippy","Rust clippy linter skill","https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbundles\u002Frust-defaults\u002Fskills\u002Fclippy\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M74WW0P1A8YWDVYM864T6J5X","hello","Hello world skill","https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbundles\u002Fbase\u002Fskills\u002Fhello\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M74WVXR7Y3XMRDXXVGTZD9HT","setup-llmenv","Interactive setup wizard for new llmenv users. Evaluates existing Claude Code configuration, helps sort into bundles, and writes llmenv-native equivalents.","https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-llmenv\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M74WVVKQPW6TKJHCTB5WHQKG","llmenv","How to use llmenv's built-in features (task tracker, memory, context-mode, codebase-memory) effectively. Load this first; it points to a reference file per enabled feature rather than dumping all of them into context.","https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Fskills\u002Fllmenv\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M74WVQEJ1S6T2M3DEF3JJF66","fyi","Use when the user asks for an \"fyi\", \"morning todo\", \"morning briefing\", \"what's on my plate\", \"what do I have open\", \"what's in flight\", \"where did I leave off\", \"what needs my attention today\", or \"my open work across projects\". Surveys the user's currently-open, in-flight, and pending work across GitHub, Linear, Slack, Pylon, and Notion, then produces a ranked, GitHub-markdown briefing for the day. Forward-looking sibling of daily-update (which reports what already happened).","https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Fexamples\u002Fconfig-llmenv-dir\u002Fbundles\u002Fwork\u002Fskills\u002Ffyi\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M74WVMF20C830E3NT7GSJH2P","daily-update","Use when the user asks for a \"standup\", \"scrum update\", \"daily update\", \"status update\", \"what did I work on\", or \"what did I do yesterday\". Scans llmenv session logs, Linear, Slack, and GitHub for the user's own activity on a given day and produces a short scrum-style update, copied to the clipboard as Slack markdown.","https:\u002F\u002Fgithub.com\u002Fphaedrus1992\u002Fllmenv\u002Fblob\u002Fmain\u002Fexamples\u002Fconfig-llmenv-dir\u002Fbundles\u002Fwork\u002Fskills\u002Fdaily-update\u002FSKILL.md",[],[]]