evolving-config
Imported from alexei-led/cc-thingz/src/skills/evolving-config.
Install
npx skills add https://github.com/alexei-led/cc-thingz/tree/master/src/skills/evolving-config
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install alexei-led-cc-thingz@llmmart
git clone https://github.com/alexei-led/cc-thingz.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole alexei-led/cc-thingz collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Evolving Agent Configuration
Audit AI coding-agent configuration and report prioritized, evidence-backed findings with the smallest fix for each. Local files come first; official docs and changelogs settle syntax, feature availability, and deprecation. Do not recommend a change on the strength of an uncited blog.
For installed cc-thingz resource or version diagnostics, use installation-doctor first and continue here for broader review or authorized changes.
Limits
- Review-only by default. Change files only when the user asks for changes or
passes
--fix. - Even in fix mode, ask before changing permissions, sandbox policy, hooks, MCP servers, model routing, package installs, deletes, moves, broad rewrites, or private or managed config.
- Edit sources, never generated exports; name the source path and the regeneration command instead.
- Never quote secret values; name only the path and key.
Done
- Review: every finding cites a
path:line, setting key, tool output, or doc URL, and findings are sorted by severity. With an unclear target, list the detected config surfaces and ask which to audit. - Fix: only approved changes are applied. Done when the relevant build/test/lint checks pass on what you changed, or you name each check that did not run and why. Without write access, return proposed changes (file, change, reason) instead of applying them.
References
references/RUBRIC.md— severity and shared checks. Read for every audit.references/platforms/claude-code.md,codex.md,pi.md— read only the ones for platforms in scope.references/platforms/other-targets.md— read when the audit covers Copilot, Cursor, or Grok packages.references/apply-fixes.md— read only in fix mode.
Scope
Instruction files (AGENTS.md, CLAUDE.md, prompts, skill and agent bodies),
the platform config each reference lists, plugin and package manifests, and
source-to-generated export rules. Include chezmoi or dotfile copies only when
deployment is part of the request.
Output
Use finding tags such as routing/thin-router, context/weak-pointer, or
invocation/over-model-invoked when they sharpen the issue.
## Config Audit
Scope: <platforms/files>
Mode: review-only | fix-approved
Sources: <local files and docs checked>
Confidence: high | medium | low
### Summary
- Files reviewed: N
- Generated files skipped: N
- Main risk: <one sentence>
### Critical
- `path:line` — <category[/subtype]>: <issue>. Evidence: <fact>. Fix: <action>.
### Important
- `path:line` — <category[/subtype]>: <issue>. Evidence: <fact>. Fix: <action>.
### Suggested
- `path:line` — <category[/subtype]>: <issue>. Evidence: <fact>. Fix: <action>.
### Working Well
- <config that should stay as-is>
### Verification
- <command run or recommended>
Omit empty severity sections. If no findings are confirmed, say No confirmed findings. When official docs are unavailable, rely on local evidence, lower
confidence, and name the gap.
Platform additions
Use the host's file search, read, and web fetch tools for inventory and docs.
Files (cc-thingz)
-
.agentbundler
-
targets
-
claude.json 797 B
{ "bodyPatch": { "mode": "sections", "sections": [ { "headingPath": ["Evolving Agent Configuration", "Platform additions"], "body": "\n- Read, Glob, and Grep for local inventory.\n- WebFetch for official docs, changelogs, and exact source URLs.\n- `mcp__perplexity-ask__perplexity_ask` only when official docs do not answer a\n current best-practice or ecosystem question.\n- AskUserQuestion for ambiguous scope and for fix approval.\n" } ] }, "frontmatterPatch": { "allowed-tools": [ "Read", "Edit", "Write", "Grep", "Glob", "WebFetch", "AskUserQuestion", "mcp__perplexity-ask__perplexity_ask" ], "argument-hint": "[--fix] [scope]", "context": "fork", "user-invocable": true } }
-
-
-
references
-
platforms
-
claude-code.md 2 KB
# Claude Code Configuration Use this reference when auditing Claude Code setup. ## Surfaces Check relevant user, project, local, and managed config: - `~/.claude/settings.json` - `.claude/settings.json` - `.claude/settings.local.json` - `CLAUDE.md`, `.claude/CLAUDE.md`, `~/.claude/CLAUDE.md`, local memory files - `.claude/skills/*/SKILL.md` - `.claude/agents/*.md` - `.claude/commands/**/*.md` - hook scripts referenced from settings - MCP server definitions and related environment variables ## Official docs to prefer - Settings: `https://docs.anthropic.com/en/docs/claude-code/settings` - Hooks: `https://docs.anthropic.com/en/docs/claude-code/hooks` - Skills: `https://docs.anthropic.com/en/docs/claude-code/skills` - Subagents: `https://docs.anthropic.com/en/docs/claude-code/sub-agents` - MCP: `https://docs.anthropic.com/en/docs/claude-code/mcp` ## Checks - Settings hierarchy is intentional: user for personal defaults, project for shared repo behavior, local for uncommitted personal overrides, managed for enforced policy. - Permissions are least-privilege. Broad allow rules, dangerous bash patterns, network access, and secret paths need explicit justification. - Hooks are deterministic, reviewed as executable code, and scoped to exact events and matchers. - Skills are focused, have precise descriptions, and put rare detail in references. - Subagents have single responsibilities, clear tool limits, and concise output contracts. - MCP servers are explicit and trusted; avoid enabling every project server by default. - Memory files contain durable, repo-wide guidance rather than task transcripts or tutorial prose. ## Common fixes - Move personal or secret settings from project files to local/user scope. - Replace advisory must-run rules in `CLAUDE.md` with hooks when deterministic enforcement is required. - Split broad skills or agents by trigger and responsibility. - Trim stale model names, deprecated keys, and duplicate permission entries after verifying docs. -
codex.md 1.9 KB
# Codex Configuration Use this reference when auditing OpenAI Codex CLI setup. ## Surfaces Check relevant user and project config: - `~/.codex/config.toml` - `.codex/config.toml` - `~/.codex/<profile>.config.toml` - system config when visible, such as `/etc/codex/config.toml` - `AGENTS.md` files in the repo tree - MCP server definitions - skills, prompts, and custom agent or subagent definitions when present ## Official docs to prefer - Best practices: `https://developers.openai.com/codex/learn/best-practices` - Config basics: `https://developers.openai.com/codex/config-basic` - Config reference: `https://developers.openai.com/codex/config-reference` - Approvals and security: `https://developers.openai.com/codex/agent-approvals-security` - Subagents: `https://developers.openai.com/codex/subagents` ## Checks - User config holds personal defaults; project config holds repo-specific behavior and loads only for trusted projects. - Profiles are explicit modes, not dumping grounds for unrelated overrides. - Sandbox mode and approval policy are conservative by default and loosened only for trusted workflows. - Network access and workspace-write expansion have a clear reason. - `AGENTS.md` is short, durable, and focused on repo workflow, tests, tools, constraints, and done criteria. - MCP servers are intentional, trusted, and use environment variables or secret managers for credentials. - Skills encode stable repeatable workflows; experimental behavior stays out of durable config. - Subagents have specific roles and inherit safe sandbox and approval assumptions. ## Common fixes - Move one-off experiments to CLI flags or temporary profiles. - Tighten sandbox, approval, or network settings for untrusted repos. - Split bloated `AGENTS.md` guidance into skills or task-specific prompts. - Remove stale profiles, duplicated MCP servers, and unsupported keys after checking the current reference. -
other-targets.md 1.1 KB
# Copilot, Cursor, and Grok Read when the audit covers GitHub Copilot, Cursor, or Grok packages. Coverage here is package layout only, taken from the Agent Bundler target contracts. Settings, permissions, and hook policy for these targets are a gap: check the official docs below and mark such findings as doc-sourced with lower confidence. - Copilot: package root holds `plugin.json`, `skills/`, `agents/`, and `hooks.json`; the catalog is `.github/plugin/marketplace.json`. Docs: `https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference` - Cursor: package root holds `.cursor-plugin/plugin.json`, `skills/`, `agents/`, and `hooks/`; the catalog is `.cursor-plugin/marketplace.json`. Docs: `https://cursor.com/docs/plugins` - Grok: uses a Claude-compatible plugin root and reads `.claude-plugin/marketplace.json`; validate with `grok plugin validate <root>`. Docs: `https://docs.x.ai/build/features/skills-plugins-marketplaces` In cc-thingz, Copilot and Cursor ship portable artifacts without a repo-owned runtime envelope, so role limits there are advisory. Claude and Grok root compatibility cannot both be enabled. -
pi.md 8.7 KB
# Pi Configuration Use this reference when auditing Pi coding-agent setup. ## Surfaces Check relevant user, project, and package config: - `~/.pi/agent/settings.json` - `.pi/settings.json` - `~/.pi/agent/AGENTS.md`, project `AGENTS.md`, and `CLAUDE.md` fallback files - `~/.pi/agent/skills/`, `.pi/skills/`, `.agents/skills/` - `~/.pi/agent/extensions/`, `.pi/extensions/` - `~/.pi/agent/mcp.json`, `.pi/mcp.json` — MCP server config, see [MCP servers](#mcp-servers) - `~/.pi/agent/trust.json` — saved project-trust decisions - prompt templates, themes, and package manifests - installed git or npm package specs in settings - `package.json` `pi` manifests for local packages ## Local docs to prefer When available in this repo or installation, read Pi docs before web research: - `README.md` - `docs/settings.md` - `docs/skills.md` - `docs/extensions.md` - `docs/packages.md` - `docs/models.md` - `docs/prompt-templates.md` - `docs/mcp.md`, `docs/security.md` — MCP config and project trust ## Checks - Project settings override global settings deliberately; nested object merge behavior is understood. - Package entries are pinned when stability matters and filtered when only some resources should load. - Local package paths resolve relative to the settings file that declares them. - Skills follow Agent Skills frontmatter rules: clear `name`, specific `description`, and references loaded on demand. - Extensions are trusted executable code, kept project-local only when the team should share them. - Package dependencies needed at runtime are in `dependencies`; Pi core packages are peer dependencies when imported. - Resource filters avoid loading unused skills, prompts, extensions, or themes. - `AGENTS.md` contains durable global or repo guidance, not per-task transcripts. - Pi-specific reality is respected: since v0.99.0 Pi has built-in MCP support (see [MCP servers](#mcp-servers)); subagents, plan mode, permission popups, and todos still need extensions or packages unless the audited install already provides them. ## MCP servers Pi connects to MCP servers over stdio or streamable HTTP as a built-in extension (`builtin:mcp`, added v0.99.0; source: [`docs/mcp.md`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/docs/mcp.md)). - Config lives in `~/.pi/agent/mcp.json` (global) or `.pi/mcp.json` (project). A project entry replaces a global entry with the same name. `.pi/mcp.json` is only read once the project is trusted (see below), because stdio servers run commands. - stdio servers take `command` (a single executable, not a shell string), `args`, `env`, `cwd`. HTTP servers take `url`, `headers`, `oauth`; `type: sse` is rejected. Server names allow only letters, digits, `_`, `-`; tools are named `mcp__<server>__<tool>`. - Secrets belong in `${NAME}` (env var) or `!command` (a command that prints the value) inside `env`, `headers`, or `oauth.clientSecret`, never as literal values. Flag any inline token, key, or password in `mcp.json`. `!command` must be the whole field value — `"Bearer !cmd"` is sent literally, not run and substituted; the command itself has to print `Bearer <token>`. - `exposure` controls how a server's tools reach the model. Recommend `codemode` (the default): the server's tools stay callable from codemode scripts without being declared to the model up front. `codemode`, `codemode-deferred`, and `deferred` are all equally callable this way — codemode scripts can call any of them, and `tool_search` can load any of them; they only differ in how much is described to the model in advance. Only `hidden` actually makes a tool uncallable — use it, at the server level or per tool via `toolExposure` (e.g. `"delete_*": "hidden"`), for tools that must never run. `autoEnableCodemode: false` at the top level of `mcp.json` stops Pi from auto-activating `codemode` for a connected server. - OAuth tokens are stored in `~/.pi/agent/mcp-auth.json`; never quote its contents. `pi mcp remove` deletes the server entry but leaves its stored OAuth tokens in `mcp-auth.json` — sign out (`/mcp` or `pi mcp logout`) first, or clean up the file, when a server is being retired for good. `mcp.log` holds only MCP logging-protocol notifications; a stdio server's stderr shows in `/mcp` and in `pi mcp list` output instead. - `pi mcp list` connects to every enabled server and reports state, tools, and connection errors — useful to recommend for an audit, but it starts every enabled stdio server's process, so do not run it yourself against config you have not reviewed. `pi mcp add|remove|login|logout` and `/mcp` manage servers without editing JSON by hand. - `mcp.json` only covers servers declared there. Extensions can also add servers for the running session with `pi.registerMcpServer()`; these never appear in `mcp.json` or in `pi mcp list` (which only sees `mcp.json` servers), only in `/mcp` while a session is running. An audit of MCP exposure has to check installed extensions and packages, not just `mcp.json`. - Disable the built-in extension with `"extensions": ["-builtin:mcp"]` in settings (project entries of `+builtin:<name>`/`-builtin:<name>` override the user setting); `pi config` lists it under Built-in. An installed extension that registers `/mcp` (for example `pi-mcp-adapter`) replaces the built-in support — Pi then ignores `mcp.json` in sessions entirely, and v0.99.0 (#10174) added a startup warning for this case. - `defaultTools` accepts `+codemode` / `+tool_search` to keep those tools active without an MCP server, and `-name` to remove a default tool; plain entries replace the whole default list. - Every MCP call goes through Pi's normal `tool_call` pipeline. cc-thingz's own `permission-gate` extension (`src/plugins/pi/extensions/extensions/permission-gate.ts`) ignores every tool but `bash`, so it does not confirm MCP calls by itself — but cc-thingz's `hook-runner` forwards every `tool_call`, MCP included, to `PreToolUse` with the tool named `mcp__<server>__<tool>` (`hook-runner/index.ts`, `shared/hook-bridge.ts`), so a `PreToolUse` hook matching `mcp__.*` can still gate them. Check whether such a hook is configured before assuming MCP tools are confirmed or unconfirmed. Servers also declare `readOnlyHint`/`destructiveHint`/`idempotentHint`/`openWorldHint` annotations a permission extension can key on; missing hints default to "not read-only, may be destructive." ### Project trust `.pi/mcp.json` (along with `.pi/settings.json`, `.pi/extensions`, `.pi/skills`, and related project resources) only loads after a project-trust decision; source: [`docs/security.md`](https://github.com/earendil-works/pi/blob/v0.99.1/packages/coding-agent/docs/security.md#project-trust). `AGENTS.md` and `CLAUDE.md` load regardless of trust, so treat their instructions as untrusted input even when trust is declined. Decision order: a command-line `--approve`/`--no-approve` override wins first, then a user-level or command-line extension handling `project_trust`, then a saved decision in `~/.pi/agent/trust.json` for the directory or its closest parent, then the user-level `defaultProjectTrust` setting (default `"ask"`). Flag `defaultProjectTrust: "always"` in user settings: in print, JSON, and RPC modes there is no trust prompt, so with `"always"` every project's `.pi/mcp.json` stdio commands run with no prompt at all. Trust does not sandbox tool calls after startup either way — it only gates whether these files load — so a trusted project's MCP servers still run with the Pi process's OS permissions. ## Current pi-subagents - Keep one `model` per agent override or watchdog scope. Current single-model releases reject `fallbackModels` in agents, overrides, and watchdog settings; even empty arrays fail. - In merge-based dotfiles, delete stale keys from existing settings as well as desired defaults. Check user and project scopes; regenerate package assets from source rather than editing installed exports. - Another model requires an explicit new launch, not resume or an automatic fallback chain. First inspect the failed run, confirm it stopped, and reconcile partial writes and external actions. Keep the task's permissions and isolation. - Use the owning workflow/controller for retries. Do not bypass a failed workflow with a CLI or retry configuration/loader failures on another model. ## Common fixes - Move private package paths, sessions, or model defaults to user settings. - Use package object filters to disable unneeded resources. - Replace generated or exported files with edits to source package files plus rebuild. - Add `npmCommand` when package installs must run through a Node version manager. - Use `/reload`-friendly extension locations for active local extension development.
-
-
apply-fixes.md 735 B
# Apply Fixes Read only in fix mode: the user asked for changes or passed `--fix`. ## Approval If fixes were not already approved, ask one question: apply which fixes — critical only, critical and important, selected items, show diffs only, or skip. Before any risky change listed under Limits in `SKILL.md`, confirm again and name the files and the risk. ## Applying - Apply only approved findings; leave opportunistic cleanup for a later audit. - Prefer small edits over rewrites, and keep secrets redacted. - Show a short diff summary and run the closest validation for the touched config. - If validation fails, revert the change unless the user asks to keep it, quote the failing line, and state the next safe action. -
RUBRIC.md 3 KB
# Config Review Rubric Use this rubric for AI coding-agent configuration audits. Platform-specific files add checks; they do not override local project rules or user intent. ## Severity Critical: - Security, privacy, or destructive-action risk. - Config cannot load or points at missing required files. - Generated output was edited while source remains stale. - A hook, permission, sandbox, extension, or MCP server can run risky work without approval. Important: - Stale or unsupported keys, tool names, models, hook events, or manifest fields. - Broad routing descriptions that can trigger the wrong skill or agent. - Duplicate skills, agents, hooks, prompts, or package entries that create ambiguity. - Always-loaded instructions exceed the repo's useful context budget. - Missing validation for config that produces artifacts. Suggested: - Low-risk cleanup that improves clarity, token use, or maintainability. - Optional newer features with clear benefit but no immediate correctness risk. - Better grouping, naming, or source-to-generated documentation. ## Shared checks ### Scope and ownership - Identify user, project, package, and generated config separately. - Prefer source files over generated exports. - Keep platform-specific rules scoped to that platform. ### Context efficiency - Keep startup context short and durable. - Move specialized workflows into skills, commands, or prompts loaded on demand. - Check whether a model-invoked description earns its always-loaded cost. - Prefer user-invoked or manual reference surfaces for niche or thin-router behavior. - Weak pointers from an entrypoint to must-read support files are a config bug, not just a docs gap. - Remove duplicate rules unless they deliberately enforce a critical behavior. - Treat long instruction files as a risk only when content is low-signal or always loaded. - Package or plugin grouping should not load unrelated instruction surfaces together when on-demand loading would work. ### Routing - Names and descriptions must say when to use the component and when not to use it. - Adjacent skills or agents should not share the same trigger phrases unless one delegates to the other. - Keep one trigger surface per branch; synonym piles are duplication, not breadth. - A component that mostly delegates to another one needs distinct trigger vocabulary or should fold into the owner. ### Safety - Least privilege wins for permissions, sandbox, hooks, extensions, MCP, and package installs. - Deterministic enforcement belongs in hooks or extensions, not advisory instructions. - Secrets must not be embedded in committed prompt, settings, or package files. - Network, filesystem expansion, and command execution need explicit scope. ### Evidence Every finding needs file, line, setting key, tool output, or official-doc evidence. No evidence, no finding. ### Fix readiness A fix is ready only when: - the source file is known - the change is small and reversible - risky effects are named - validation is available or the gap is reported
-
-
SKILL.md 3.6 KB
--- description: Audit and improve AI coding-agent configuration. Use when reviewing or changing Claude Code, Pi, Codex, Copilot, Cursor, Grok, skill, agent, hook, MCP, permission, package, or generated-export setup. Default is review-only; fixes require explicit user approval or --fix. NOT for score-only instruction review or prompt lint; use reviewing-instructions. NOT for application config, git hygiene, code bugs, ordinary docs, or generated files without their source. name: evolving-config --- # Evolving Agent Configuration Audit AI coding-agent configuration and report prioritized, evidence-backed findings with the smallest fix for each. Local files come first; official docs and changelogs settle syntax, feature availability, and deprecation. Do not recommend a change on the strength of an uncited blog. For installed cc-thingz resource or version diagnostics, use installation-doctor first and continue here for broader review or authorized changes. ## Limits - Review-only by default. Change files only when the user asks for changes or passes `--fix`. - Even in fix mode, ask before changing permissions, sandbox policy, hooks, MCP servers, model routing, package installs, deletes, moves, broad rewrites, or private or managed config. - Edit sources, never generated exports; name the source path and the regeneration command instead. - Never quote secret values; name only the path and key. ## Done - Review: every finding cites a `path:line`, setting key, tool output, or doc URL, and findings are sorted by severity. With an unclear target, list the detected config surfaces and ask which to audit. - Fix: only approved changes are applied. Done when the relevant build/test/lint checks pass on what you changed, or you name each check that did not run and why. Without write access, return proposed changes (file, change, reason) instead of applying them. ## References - `references/RUBRIC.md` — severity and shared checks. Read for every audit. - `references/platforms/claude-code.md`, `codex.md`, `pi.md` — read only the ones for platforms in scope. - `references/platforms/other-targets.md` — read when the audit covers Copilot, Cursor, or Grok packages. - `references/apply-fixes.md` — read only in fix mode. ## Scope Instruction files (`AGENTS.md`, `CLAUDE.md`, prompts, skill and agent bodies), the platform config each reference lists, plugin and package manifests, and source-to-generated export rules. Include chezmoi or dotfile copies only when deployment is part of the request. ## Output Use finding tags such as `routing/thin-router`, `context/weak-pointer`, or `invocation/over-model-invoked` when they sharpen the issue. ```markdown ## Config Audit Scope: <platforms/files> Mode: review-only | fix-approved Sources: <local files and docs checked> Confidence: high | medium | low ### Summary - Files reviewed: N - Generated files skipped: N - Main risk: <one sentence> ### Critical - `path:line` — <category[/subtype]>: <issue>. Evidence: <fact>. Fix: <action>. ### Important - `path:line` — <category[/subtype]>: <issue>. Evidence: <fact>. Fix: <action>. ### Suggested - `path:line` — <category[/subtype]>: <issue>. Evidence: <fact>. Fix: <action>. ### Working Well - <config that should stay as-is> ### Verification - <command run or recommended> ``` Omit empty severity sections. If no findings are confirmed, say `No confirmed findings.` When official docs are unavailable, rely on local evidence, lower confidence, and name the gap. ## Platform additions Use the host's file search, read, and web fetch tools for inventory and docs.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.