agentleFS
liqiongyuliqiongyu/my-agents/skills/agent-lifecycle-manager/SKILL.md

agent-lifecycle-manager

Skill29 starsChanged 9 months agoMITView on GitHub

Manage the lifecycle of sub-agents: create or update agent packages, validate cross-surface agent contracts, evaluate routing behavior, tighten invocation boundaries, tune Codex runtime defaults, install or publish agents, or audit an agent library. Use only when the request is explicitly about agents or agent libraries, not for ordinary coding, implementation, or general project planning.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before creating a new agent, answer these questions honestly.

    line 34
  2. Distinctive:

    If the agent passes the gate, proceed to Create / Update.

    line 42
  3. Very specific:

    Use npm run new -- --agent <name> for a fresh scaffold.

    line 52
  4. Distinctive:

    Read platform-surfaces.md for the authored file layout and install targets.

    line 56
  5. Distinctive:

    When validating this skill package itself (not a target agent), use the canonical repo source only:

    line 68
  6. Very specific:

    Use realistic prompts, not toy examples.

    line 77
  7. Distinctive:

    Read evaluation-loop.md for the eval harness commands and benchmark setup.

    line 79
  8. Very specific:

    Only when triggering is wrong.

    line 83
  9. Distinctive:

    Read audit-rubric.md for the 11-dimension rubric and scoring formula.

    line 99
  10. Distinctive:

    After any stage, report: what was done, what changed, what was validated vs not, and the next step if work remains.

    line 103
  11. Very specific:

    Self-validation: always use ALM_CANONICAL_DIR=skills/agent-lifecycle-manager and …

    line 108

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent Lifecycle Manager

Manage agent packages (agent.json, claude-code.md, codex.toml, CHANGELOG.md) as a lifecycle, not isolated file edits. This skill routes the request to the right stage, runs it, and closes the loop.

Route First

Classify the request before doing anything:

StageWhenKey action
Create / UpdateNew agent or material revisionWrite the 3 authored files with minimal instructions
ValidateAfter any changenpm test + quick_validate_agent.py
EvaluateTest on realistic promptsseed_eval_workspace.py + run_surface_eval.py
OptimizeUnder/over-triggeringTighten description wording
InstallActivate on a surfacenpm run install-agent
AuditLibrary health checkaudit_agent_inventory.py

Summarize the chosen route in one sentence before proceeding.

Creation Gate

Before creating a new agent, answer these questions honestly. If most answers are "no", don't create it.

  1. Does a dedicated agent add value beyond inline execution? Value can come from behavioral differences (the model wouldn't do this by default), context isolation (keeps the main agent's window clean), result compression (returns a summary instead of raw process), parallelism (can run alongside other agents), or permission narrowing (read-only scope). At least one must apply.
  2. Can you name the behavioral contract? An agent needs to enforce something specific — an output format, a safety boundary, a collaboration protocol, a workflow the model wouldn't follow unprompted. If you can't articulate it, there's no agent here.
  3. Is there an existing agent that could be slightly adjusted instead? Prefer tightening an existing agent over creating a new one with overlapping scope.
  4. Will this be spawned frequently enough to justify its existence? One-off workflows don't need agents. Agents are for recurring patterns.
  5. Can you write the instructions concisely? Official examples use 1-5 sentences. If you need 50+ lines, you're probably teaching the model things it already knows — strip to behavioral contract only, or split the scope.

If the agent passes the gate, proceed to Create / Update.

Create / Update

Agent instructions should be narrow and opinionated — 5-8 lines of behavioral contract, not a teaching manual. The model already knows how to search, review, plan, and debug. Only specify:

  • Role boundary (read-only? write? what scope?)
  • Output contract (what to return, in what shape)
  • Safety rails (what to never do)

Use npm run new -- --agent <name> for a fresh scaffold. Keep semantics aligned across agent.json, claude-code.md, and codex.toml — one routing boundary, one role, same instructions.

For Codex agents, set sandbox_mode, model, and model_reasoning_effort explicitly rather than inheriting from the parent session.

Read platform-surfaces.md for the authored file layout and install targets. Read invocation-posture.md before writing or tuning descriptions.

Validate

Run in order:

  1. npm run build
  2. npm test
  3. uv run python "$ALM_DIR/scripts/quick_validate_agent.py" agents/<name>

The agent-specific validator checks cross-surface alignment, archetype-capability consistency, runtime defaults, and tools alignment. Fix structural issues before deeper evaluation.

When validating this skill package itself (not a target agent), use the canonical repo source only:

uv run python "$ALM_CANONICAL_DIR/scripts/quick_validate.py" "$ALM_CANONICAL_DIR"
uv run python "$ALM_CANONICAL_DIR/scripts/validate_eval_suite.py" "$ALM_EVAL_FILE"

Evaluate

Use realistic prompts, not toy examples. Mix: should-handle, should-stretch, should-not-handle, near-miss.

Read evaluation-loop.md for the eval harness commands and benchmark setup.

Optimize Invocation

Only when triggering is wrong. Draft should-trigger / should-not-trigger prompts, tighten descriptions, record before/after.

Install

npm run install-agent -- <name> --platform claude|codex|all --scope project

Validate before installing. Confirm installed copies exist under .claude/agents/ and/or .codex/agents/.

Audit

uv run python "$ALM_DIR/scripts/audit_agent_inventory.py" --root agents

Read audit-rubric.md for the 11-dimension rubric and scoring formula. Prioritize dangerous overreach and structural breakage before polish.

Close

After any stage, report: what was done, what changed, what was validated vs not, and the next step if work remains.

Script Paths

  • Runtime: ALM_DIR=skills/agent-lifecycle-manager (canonical), .agents/skills/agent-lifecycle-manager (Codex), .claude/skills/agent-lifecycle-manager (Claude Code)
  • Self-validation: always use ALM_CANONICAL_DIR=skills/agent-lifecycle-manager and ALM_EVAL_FILE=skills/agent-lifecycle-manager/eval/eval-cases.json

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.