AGENT SKILL

audit-repo

Audit Chimaera end to end for correctness, security, performance, UX, developer experience, and agent-context drift, then land bounded high-confidence fixes with proportional verification. Use for broad repository health checks or modernization passes, especially when parallel subagents are requested.

License 许可
AGPL-3.0
最近更新
2026-11-12
Stars
★ 7
Forks
1

01 前言 Front Matter

name
audit-repo
description
Audit Chimaera end to end for correctness, security, performance, UX, developer experience, and agent-context drift, then land bounded high-confidence fixes with proportional verification. Use for broad repository health checks or modernization passes, especially when parallel subagents are requested.

03 SKILL.md 正文

Audit the repository

Run a breadth-first audit without turning it into an unbounded rewrite. Preserve wire compatibility, daemon resource ceilings, and the user's unrelated changes. Keep four outputs apart: the inventory, the evidence, the fixes, and the accepted risks. Do not report a suspicion as a finding until it has evidence.

1. Inventory

  1. Read the root AGENTS.md, snapshot git status --short, and list the repository, workflows, rules, skills, and nested AGENTS.md files.
  2. Read every nested map and .claude/rules/*.md file that governs files you will touch. Verify documentation claims against the current tree.
  3. Build the feature/platform matrix. Take the features from the feature catalog. Take the surfaces (local, remote, native app, cloud session) and the baseline counts from the inventory in the robustness plan. Mark each cell as covered, uncovered, or not applicable.
  4. Assign each cell to one owner. When parallel agents are available and the user requested fan-out, give each agent a non-overlapping file-ownership lane. A useful split is:
    • Rust daemon, PTY, remote orchestration, and server
    • structured chat drivers, journal, protocol, and chat UI
    • non-chat web UI and native shell
    • root agent owns cross-cutting automation, dependencies, and integration
  5. Tell every editing agent:
    • the worktree is shared;
    • preserve others' edits;
    • edit only inside your lane;
    • make only scoped, high-confidence fixes.

2. Collect evidence

Prioritize evidence over cleanup taste. For each finding, record the file, the invariant it breaks, and how you observed it (command output, log line, test, or reproduction). Audit these invariants:

  • correctness and security: authentication boundaries, path/process handling, untrusted agent output, races, cancellation, reconnects, and bounded storage
  • performance: busy loops, unbounded buffers, avoidable cloning or I/O, UI waterfalls, oversized bundles, and work repeated on hot paths
  • UX and accessibility: keyboard/focus behavior, loading/error/empty states, responsiveness, theme consistency, and destructive-action affordances
  • architecture: stable daemon-to-UI wire shapes, clear ownership boundaries, duplicated policy, dead code, and abstractions that remove real repetition
  • agent experience: accurate maps, progressive-disclosure skills, matching Claude/Codex bridges, safe hooks, reproducible commands, and fast feedback
  • supply chain: locked installs, minimal workflow permissions, immutable action pins, automated dependency updates, and dependency-diff review

When the user asks for current best practices, browse official primary sources and distinguish verified guidance from inference. Do not mass-upgrade or refactor solely because a newer version exists.

3. Fix and verify

  1. Fix only findings that have evidence and a bounded change. Review the combined diff for conflicting assumptions and accidental wire or public-behavior changes. Update affected maps, rules, or feature docs.

  2. Run the smallest relevant checks first, then the full applicable gates:

    node scripts/check-agent-assets.mjs
    node scripts/check-workflow-security.mjs
    node scripts/check-doc-links.mjs
    npm --prefix web-ui run check
    npm --prefix web-ui run test
    npm --prefix web-ui run build
    just check
    just app-check        # when native-shell code or automation changed
    
  3. Use /verify-app for runtime-observable changes. Run just chat-smoke for Claude/Codex or just chat-smoke-acp for ACP when a pinned agent protocol or CLI driver changed; these use live credentials, network access, and billable turns.

4. Report

Write four separate lists:

  • Inventory: what you covered, and which matrix cells you did not reach.
  • Fixes: each fix with its evidence and the exact verification you ran.
  • Accepted risks: each finding you did not fix, with the reason and the boundary of the follow-up. Prefer several small, defensible fixes over speculative cross-repo churn. Record larger redesigns here.
  • Not run: each check you could not run, and why.

04 同仓库更多 Skills

martinappberg
martinappberg/chimaera

worktree-lifecycle

Keep Chimaera's git worktrees and their Rust build output from filling the disk — when to remove your worktree, how to run scripts/worktree-gc (dry run, --apply, --self), what the SessionStart/SessionEnd hooks do, and the hard rule never to touch an ACTIVE worktree. Use when your PR has merged, when disk space is low or a session-start hook flagged it, before a big cargo build (just check, cargo test --workspace, an app build), or when asked to clean up worktrees or target/ dirs.

★ 7
martinappberg
martinappberg/chimaera

verify-app

Verify a Chimaera change end-to-end against the real daemon, UI, and PTY layer before claiming it works. Use after changing daemon/server/PTY/UI behavior — especially terminal, reconnect, resize, previews, or agent-launch flows, which have all had bugs that only reproduce live. Skip for pure docs/comment changes.

★ 7
martinappberg
martinappberg/chimaera

ship-pr

Open a pull request for Chimaera correctly — the CI gates that must pass, the Conventional-Commit prefix that drives the automatic version bump, and the [skip release] marker for docs/chore PRs that shouldn't ship a version. Use when creating a PR, choosing a commit/PR title, or deciding whether a change should cut a release.

★ 7
martinappberg
martinappberg/chimaera

refresh-public-messaging

Refresh Chimaera's public face — the README and the GitHub Pages site (site/index.html + site/docs.html) — so it matches what the product actually does now, and brainstorm positioning with the maintainer. Use when the README or website has drifted behind shipped features, when revisiting the selling points / tagline, or on a periodic "is our public face still current and well-said?" pass. Positioning is the maintainer's call — never rewrite it unilaterally.

★ 7
martinappberg
martinappberg/chimaera

document-feature

Add or update a Chimaera feature page under docs/features/ so the feature catalog stays true as capabilities ship. Use when a change adds or changes user-facing behavior — a new pane surface, route, agent capability, CLI command — or when you find a feature page that's stale or missing. Defines the page structure, the derived-vs-intent split, and the rule that a feat: PR must carry its doc update.

★ 7
martinappberg
martinappberg/chimaera

develop

Run Chimaera locally and iterate on it — the daemon + Vite web-UI dev loop, ports, dev-mode auth, the build-embeds-UI gotcha, the isolated per-worktree daemon (chimaerad-isolated), and where things live. Use when starting to develop or run the app, when a change needs the real daemon/UI to see, when working in a git worktree or alongside another daemon, or when the dev server won't come up (port in use, Node version, blank UI).

★ 7