AGENT SKILL

zagrosi-cleanup

Simplify existing code while preserving behavior. Use when asked to clean an AI-generated or difficult repository, split godfiles, remove duplication or dead layers, or review a PR for unnecessary complexity.

License 许可
Apache-2.0
最近更新
2026-11-11
Stars
★ 1.6k
Forks
474

01 前言 Front Matter

name
zagrosi-cleanup
description
Simplify existing code while preserving behavior. Use when asked to clean an AI-generated or difficult repository, split godfiles, remove duplication or dead layers, or review a PR for unnecessary complexity.
allowed-tools
[ "Bash(python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" team status *)", "Bash(python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" status *)", "Bash(python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" next-section *)", "Bash(python \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" team status *)", "Bash(python \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" status *)", "Bash(python \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" next-section *)", "Bash(py -3 \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" team status *)", "Bash(py -3 \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" status *)", "Bash(py -3 \"${CLAUDE_PLUGIN_ROOT}/scripts/zagrosi_skills.py\" next-section *)" ]

02 资源文件 1

03 SKILL.md 正文

Forge Cleanup

For a Git target, check team status --target-dir "{target_dir}" with Forge’s helper before work or resume. Follow team coordination when configured or unavailable; reuse the same task across phases and delegated agents.

Resolve absolute plugin_root: the plugin directory two levels above this skill's folder, containing scripts/zagrosi_skills.py; never the target repo. Claude Code substitutes it when loading this skill: ${CLAUDE_PLUGIN_ROOT}. Literal text there means the file was read directly: derive the path; no such shell variable exists. Run every helper command, including returned argv arrays, with the exact prefix python3 "{plugin_root}/scripts/zagrosi_skills.py" (Python 3.11+; python or py -3 on Windows); host pre-approvals match that text.

Produce code that is easier to understand and change. Apply the shared engineering standard. Fewer concepts and clearer responsibilities matter; line counts are evidence, never targets. Preserve public contracts even when external callers are unseen. For review/audit-only requests, return findings and stop before edits. Existing implementation authorization counts; do not ask again merely for cleanup.

Scope and baseline

  1. Read repository instructions, working-tree changes, entrypoints, callers, and tests. Follow real execution paths; exclude generated/vendor code unless the task explicitly includes it.
  2. For an explicit repository cleanup, identify the highest-value problems: mixed responsibilities, repeated policy, dead or speculative layers, unclear state/side effects, misleading names, missing error handling, and weak tests. Rank by impact and regression risk. Keep the list in the existing plan.
  3. For a final PR pass, inspect only the diff and affected callers. Repair newly introduced or encountered complexity; put unrelated debt in the summary. Do not start a second whole-repository cleanup automatically.
  4. Establish existing test results. Add characterization tests where coverage cannot protect public results, errors, ordering, exports, and side effects. Use compatibility checks for meaningful mutable refactors; capture the original source and passing checks before changing it. Existing coverage can supply those checks. Report pre-existing failures separately; never describe them as a clean baseline.

Change and prove

Use Plan and Implement for substantive cleanup. Reuse an admitted plan when applicable; update its ownership and acceptance before edits. Group by cohesive responsibility and dependencies, with one primary writer per overlapping file. Tiny, low-risk cleanup within active work stays in its section.

Prefer deletion, direct functions, and existing boundaries. Split a godfile by responsibility while retaining a small compatible entrypoint. Do not replace it with arbitrary fragments, forwarding wrappers, a new framework, or compressed one-liners. Separate intentional behavior changes from behavior-preserving work.

Run targeted regression checks before and after each meaningful change. Review the actual structural gain and regressions. Where the host supports fresh-context subagents, have one independently check the diff and affected callers for preserved behavior (same-host review). In Claude Code, run delegated agents in the foreground when offered. Use another provider when requested or useful for a concrete risk. Resolve findings rather than counting approvals. Run the integration suite once after the final changes and capture its receipt. If any later fix changes checked inputs, refresh the affected evidence.

Report what became simpler, preserved behavior and measured checks, pre-existing failures, and remaining debt. Do not claim improved performance without measuring it. Follow existing authorization for commits/PRs; this skill creates no hooks or recurring background work.

04 同仓库更多 Skills

hashgraph-online
hashgraph-online/awesome-codex-plugins

migrate-to-e2e

Moves an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite to e2e one slice at a time, with the old suite running beside the new one until each ported test is proven. Keeps a MIGRATION.md progress file so any later session resumes where the last stopped. Optionally plants a defect to show both suites catch it. Use for /migrate-to-e2e, "migrate our tests to e2e", "port these Maestro flows", "move our TesterArmy tests", or when a project has an e2e config and an older suite still running.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

e2e

Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

create-verification-skill

Generate a project-local verify-<app> skill on top of e2e, so any coding agent can launch the app, check it is worth driving, exercise a feature the way a user does, keep evidence, and bug bash it. Writes the skill, a feature map with one explore charter per feature, and proves it once. Use for /create-verification-skill, "make a verification skill for this repo", or when a project has no scripted way to prove UI behavior.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-search

deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-reflect

End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

revid

Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.

图像与多媒体Skill与智能体开发
★ 1.6k