agentleFS
IvanMurzakIvanMurzak/pipeline-claude/skills/optimize/SKILL.md

optimize

Skill1 starsChanged 5 months agoMITView on GitHub

USER-INVOKED ONLY (e.g. on a weekly schedule) — review the pipeline run measurements under .pipeline/.stats/ (durations, outcomes, tokens, tool failures), inspect run logs where something regressed or repeatedly failed, and apply targeted improvements to specific pipelines via pipeline-improver. Never auto-invoke this skill; it exists so measurement review costs zero tokens until the user explicitly asks for it.

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use arrange, overdrive and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • nikafastovets-langSkill

    arrange

    Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy to create intentional compositions.

    Also in 6 projects that use this

  • nikafastovets-langSkill

    overdrive

    Push interfaces past conventional limits with technically ambitious implementations. Whether that's a shader, a 60fps virtual table, spring physics on a dialog, or scroll-driven reveals — make users ask "how did they do that?

    Also in 10 projects that use this

  • mtctSkill

    quieter

    Tone down overly bold or visually aggressive designs. Reduces intensity while maintaining design quality and impact.

    Also in 14 projects that use this

  • mtctSkill

    teach-impeccable

    One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.

    Also in 10 projects that use this

  • zwy123zwySkill

    normalize

    将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。

    Also in 10 projects that use this

  • mickeylorenziniSkill

    harden

    Audits any substantial deliverable — documents, grant sections, strategies, protocols, skills, configs, roadmaps, plans — against domain-specific quality criteria before delivery. Searches the web for best practices, runs dual-pass thematic and structural audit with severity classification, fixes all issues, and iterates until convergence. Activates when producing deliverables exceeding 4 paragraphs or 20 lines, or when the user says "harden", "audit", "stress test", or "review before delivering", or when re-auditing a modified deliverable for regressions. Does not activate for conversational responses, brainstorming, web search summaries, or rough drafts.

    Also in 14 projects that use this

  • +4 more from mtct
  • +1 more from nikafastovets-lang

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 44 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read SUMMARY.md first — it is the whole picture.

    line 22
  2. Distinctive:

    Read a pipeline's iteration files ONLY when you are about to propose a concrete improvement.

    line 24
  3. Very specific:

    Refresh + load the summary: Run pipeline stats from the project root and read its output (it regenerates and prints SUMMARY.md).

    line 30
  4. Very specific:

    Investigate each flagged pipeline, cheaply: Read its 2–3 most recent runs/<run-id>.log files.

    line 50
  5. Very specific:

    If needed, check leftover feedback (<pipeline>/.feedback/) and design-time lint (pipeline plan --root <pipeline> --json → warnings).

    line 62
  6. Very specific:

    If .stats/ shows tokens pending everywhere, note that enrichment happens when a manager-driven run's session ends (driver runs enrich …

    line 89

“Common” is measured: kept by at least 6 in 10 of the 44 edited versions of this file we could read. “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

Optimize pipelines from their run measurements

You are running the periodic optimization pass over the measurement files the stats system (pure software, PIPELINE_STATS_ENABLED, default on) has been writing under <project>/.pipeline/.stats/. The user invokes this deliberately (typically weekly). $ARGUMENTS may narrow the pass to specific pipelines; empty means review everything.

Token discipline

The measurement system itself never spends LLM tokens — all analysis cost lives in THIS skill, which only the user can trigger (disable-model-invocation: true). Keep the pass cheap:

  • Read SUMMARY.md first — it is the whole picture. Do NOT read every runs.jsonl.
  • Drill into a per-run log (.stats/<pipeline>/runs/<run-id>.log) ONLY for pipelines you flagged.
  • Read a pipeline's iteration files ONLY when you are about to propose a concrete improvement.
  • Apply edits through ONE pipeline-improver spawn per flagged pipeline — never edit iteration files yourself from this skill, and never spawn improvers for healthy pipelines.

Procedure

  1. Refresh + load the summary. Run pipeline stats from the project root and read its output (it regenerates and prints SUMMARY.md). If it reports no measurements, say so and stop — nothing to optimize.
  2. Flag problem pipelines (restricted to $ARGUMENTS when given). A pipeline is flagged when, compared with ITS OWN history in the summary/records:
    • halts or non-completed outcomes are frequent (≥ ~25% of recent runs), or a repeating halt_reason appears;
    • tool failures are frequent or recurring — the "Tool fails" columns (avg per run in the rollup; per-run count + worst offender, e.g. 7 (Bash 5), in Recent runs). Flag when recent runs repeatedly fail the SAME tool, or the fail rate jumped vs. the pipeline's history. A run can be completed and still be sick — dozens of failed calls mean steps are retrying their way to success and burning time/tokens on wrong instructions;
    • average duration or out-tokens drifted clearly upward across recent runs (bloat — steps re-reading too much, or iteration files growing);
    • a single step dominates the run duration in recent per-run logs (extraction candidate);
    • runs sit in "In-flight or crashed runs" with large buffer ages (crash/kill pattern). Healthy pipelines are reported as healthy in one line each — no further reading.
  3. Investigate each flagged pipeline, cheaply. Read its 2–3 most recent runs/<run-id>.log files; correlate with halt_reasons from the summary. For tool failures, the evidence is IN the .log: enrichment appends a tool fails (N): section — one line per failure with timestamp, tool, [step] when attributable (exact for driver runs; timestamp-mapped for manager runs), and the error the tool returned. Classify each pattern:
    • pipeline-attributable — the same error recurs across runs and points at the iteration's instructions: a wrong/stale command or path in Steps, a missing preflight (tool not installed, server not running, file assumed to exist), wrong assumptions about repo layout, or a step retrying a forbidden operation. These justify an improvement.
    • environment noise — one-off network timeouts, transient lock contention, a tool erroring once and succeeding on the retry with no pattern across runs. Report it, but do NOT "fix" noise by editing the pipeline. If needed, check leftover feedback (<pipeline>/.feedback/) and design-time lint (pipeline plan --root <pipeline> --json → warnings). Form ONE concrete improvement hypothesis per pipeline: e.g. "step 03 halts on a missing preflight — add it to Steps", "step 02 fails bun test 5× per run because Steps says bun test but this repo needs bun run test — fix the command", "step 02 doubled in tokens — compact via replace-don't-append", "extract the deterministic block in step 04 to a script".
  4. Ask before applying (one AskUserQuestion): list flagged pipelines with the one-line diagnosis + proposed improvement each, and let the user pick which to apply (multiSelect). Skip the question only when the user's invocation already named the pipelines AND asked to fix.
  5. Apply via the improver. For each approved pipeline, spawn pipeline:pipeline-improver with a Tier-1-style improvement brief built from your diagnosis (symptom, evidence — run ids, durations, halt_reasons, and for failure-driven fixes the failing tool + the exact recurring error line from the .log — and the specific proposed edit; respect its token-budget counter-pressure rules). Relay its structured report. If the improver emits script_creation_briefs, spawn pipeline:pipeline-script-creator once per brief, sequentially.
  6. Report. Per pipeline: status (healthy / improved / needs-human), what changed, and the measurement that should move next week. Remind the user the next /pipeline:optimize run will show whether the change helped (the stats files are the before/after evidence).

Boundaries

  • Blast radius: pipeline folders only (.pipeline/**) — never consumer code, never the plugin install, never .stats/ contents (the evidence is append-only; do not "clean" it).
  • This skill NEVER runs pipelines and NEVER deletes measurement files.
  • If .stats/ shows tokens pending everywhere, note that enrichment happens when a manager-driven run's session ends (driver runs enrich themselves at their terminal action) — that is expected, not a defect. Runs recorded BEFORE the plugin learned to persist tool failures show — in the Tool fails columns; that means "not measured", not "zero".

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.