agentleFS
muon-m2muon-m2/magento2-tools/skills/triage/SKILL.md

triage

Skill6 starsChanged 28 days agoMITView on GitHub

Read-only: turns a Magento 2 audit/review/security/performance findings report into an ordered, approvable remediation plan, each finding routed to the skill owning its fix. Use for a fix plan, to ask who should fix findings, or to triage a report. Never re-scans or edits code. Consumes magento2-tools:audit output; hand the plan to magento2-tools:remediate or the owning skill (e.g. magento2-tools:fix). Fresh findings: magento2-tools:review, magento2-tools:security or magento2-tools:perf-audit.

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 180 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-only: Never edits a module, never writes to vendor/, never runs a fix.

    line 28
  2. Very specific:

    Read each finding's fingerprint.

    line 83
  3. Very specific:

    If the waivers file is gitignored or untracked, the run warns that the suppressions are local only and will reset — commit the file or …

    line 98
  4. Very specific:

    Run scripts/build-plan.sh, then present the plan for approval: batch order, owner and gate per batch, the counts in each bucket, and the …

    line 118
  5. Distinctive:

    Every ingested finding appears in exactly one bucket.

    line 170
  6. Very specific:

    No file outside {output_root}/remediation/ is created or modified.

    line 172

“Common” is measured: kept by at least 6 in 10 of the 180 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

Magento 2 Findings Triage

audit and its sibling findings skills answer what is wrong. This skill answers what to do about it, in what order, and who does it — and it answers with a document a human can approve rather than a conversation that has to be re-held every run.

It is the read-only half of the remediation cycle:

audit / review / security / perf-audit  ──►  triage  ──►  remediate  ──►  audit --compare
        (what is wrong)                     (the plan)    (the work)      (what closed)

Core Rules

  • Read-only. Never edits a module, never writes to vendor/, never runs a fix. The only thing it writes is its own plan under the output root.
  • JSON is the contract; Markdown is never parsed. The Markdown report is for humans. Every decision is made from the JSON findings document (context/references/findings-schema.md).
  • Never guess an owner. Routing is resolved by context/scripts/route-finding.sh over the matrix in context/references/fix-routing.md. A finding with no matching row is reported in unrouted[] — it is never quietly defaulted to fix.
  • A waived finding is reported, never dropped. It lands in waived[] with its verdict, reason and author, and is never counted as closed. An expired waiver resurfaces the finding instead of continuing to suppress it.
  • Only confidence: confirmed is schedulable. A candidate or needs-triage finding is evidence to re-check, not work to book, so it is held in verify_first[].
  • Nothing is silently discarded. A finding filtered out by --severity or an owner filter is recorded in skipped[] with the reason.
  • Artifact location. This skill accepts --docs-root=<path> (see context/references/artifact-layout.md). When set, run the builder with DOCS_ROOT=<path> so the plan lands under <path>/remediation/; otherwise it defaults to {ctx.docs_root}/remediation/.

Workflow

Phase 0 — Context

Invoke context once. Capture vendor, docs_root, and theme.breeze (the Breeze predicate changes who owns a frontend finding).

Phase 1 — Ingest

Resolve the input document:

--from valueBehaviour
omittedNewest {output_root}/audits/*-audit-*.json.
a findings .jsonThat document.
a directoryEvery *.json in it, merged (per-dimension reports from one run). A *.sarif is read only when it has no .json sibling — the JSON is strictly richer.
a .sarif logIts results, including SARIF produced by CI or a third-party scanner.

Validate schemaVersion: a major mismatch is a hard error (exit 4) — the field semantics are not ours to guess; a minor one warns, is recorded in scanner_errors[], and the run continues.

Markdown is never an input — it is the human view; JSON is the contract.

SARIF is a deliberately degraded input. It carries no confidence, recommendation or verification, so every finding read from one is forced to confidence: needs-triage and held in verify_first[] by Phase 4 — a SARIF finding can be routed and reported but can never enter a batch or drive an automated patch. A CI scanner's output is evidence, not a diagnosis. Our own SARIF stays identifiable across the round trip because the emitter writes the fingerprint to partialFingerprints["m2FindingFingerprint/v1"] and keeps the finding category in the rule's name; a foreign SARIF has neither, so its findings are fingerprinted from what they do carry and will not match a waiver written against a JSON report.

Phase 2 — Fingerprint

Read each finding's fingerprint; a pre-1.1 document is fingerprinted on the fly with findings-lib.sh::finding_fingerprint. Findings sharing a fingerprint across input documents collapse into one entry that keeps the highest severity and records every producer that raised it.

Phase 3 — Waivers

Load {output_root}/findings/waivers.yml (or --waivers=<path>) and apply it:

Waiver stateResult
activewaived[], with verdict / reason / author. Never counted closed.
expiredverify_first[], noted waiver expired <date>.
matches no current findingreported in stale_waivers[] so dead entries get pruned.

If the waivers file is gitignored or untracked, the run warns that the suppressions are local only and will reset — commit the file or relocate it with --waivers=.

Phase 4 — Confidence gate

confirmed → routable. Anything else → verify_first[] with the reason.

Phase 5 — Route

One route-finding.sh call per finding, keyed on producer, category, subcategory, severity, evidence file and the Breeze predicate. unrouted → unrouted[].

Phase 6 — Batch

Group routable findings by owner and gate, order the groups per references/plan-format.md, and sort within a group by severity descending. --include / --exclude filter batches without changing their relative order.

Phase 7 — Emit and present

Run scripts/build-plan.sh, then present the plan for approval: batch order, owner and gate per batch, the counts in each bucket, and the gate: manual items called out as human actions (a burned credential needs rotation, not just a patch). Approval is what turns a plan into work — this skill stops here.

Inputs

/triage [--from=<path>] [--waivers=<path>] [--severity=<min>]
        [--include=<owner,…>] [--exclude=<owner,…>] [--docs-root=<path>]
        [<Vendor>_<Module>]

Flags map onto scripts/build-plan.sh env vars:

FlagEnv var
--from=INPUT_JSON
--waivers=WAIVERS_FILE
--severity=MIN_SEVERITY
--include=INCLUDE_OWNERS
--exclude=EXCLUDE_OWNERS
--docs-root=DOCS_ROOT
<Vendor>_<Module>TARGET_MODULE + TARGET_PATH

Outputs

{output_root}/remediation/{Vendor}_{Module}-plan-{YYYY-MM-DD}.{json,sarif} with outputKind=remediation, plus a Markdown plan sharing the basename — the approval artifact. Shape and buckets: references/plan-format.md.

Reference Files

  • references/plan-format.md — the outputKind=remediation document, its four buckets, and the batch-order rationale.
  • context/references/fix-routing.md — the routing matrix itself (finding → owning skill).
  • context/references/findings-schema.md — the findings document this skill consumes and the remediation output kind it emits.
  • context/references/severity.md — the shared five-point severity scale.
  • context/references/artifact-layout.md — the output root and filename scheme.

Scripts

  • scripts/build-plan.sh — ingest → waive → gate → route → batch → emit.
  • scripts/inject-plan-sections.sh — POST_JSON_HOOK that adds the plan's top-level buckets to the emitted document.

Acceptance Criteria

  • Produces {Vendor}_{Module}-plan-{date}.json with outputKind=remediation, per-finding owner / gate / batch / routing_rationale / status / source_finding, and the top-level batches[], waived[], verify_first[], unrouted[], stale_waivers[].
  • Every ingested finding appears in exactly one bucket; none is dropped.
  • lint is always the last batch, and upgrade (when present) the first.
  • No file outside {output_root}/remediation/ is created or modified.

Related Skills

  • audit — produces the consolidated findings document this skill triages. audit finds; triage decides who fixes.
  • remediate — executes the plan batch by batch and reports what closed.
  • review / security / perf-audit / lint / a11y-audit / marketplace / breeze-compat — the individual dimensions; run one directly when only that dimension is wanted.
  • fix, feature, upgrade, extension-point, indexer, message-queue, webapi, graphql, admin-form, admin-listing, frontend, breeze-adapt, i18n, test-generate, docs — the owning skills a plan routes to.

Download now (ZIP)

  • Other versions191 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 191

    1. mattpocock/skills★ 309ksame name
    2. withastro/astro★ 63ksame name
    3. vectorize-io/hindsight★ 57ksame name
    4. herdrdev/herdr★ 47ksame name
    5. ogulcancelik/herdr★ 44ksame name
    6. colinhacks/zod★ 44ksame name
    7. QuivrHQ/quivr★ 40ksame name
    8. vercel-labs/skills★ 37ksame name
    9. pnpm/pnpm★ 37ksame name
    10. vercel-labs/add-skill★ 35ksame name

    181 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use setup-matt-pocock-skills, writing-beats 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.
    • GoogleSkill

      setup-matt-pocock-skills

      Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

      Also in 148 projects that use this

    • LesaniSkill

      writing-beats

      Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

      Also in 58 projects that use this

    • liufeng1976Skill

      setup-ts-deep-modules

      Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

      Also in 33 projects that use this

    • SethGammonSkill

      ascii-diagram

      Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

      Also in 4 projects that use this

    • simo97Skill

      migrate-to-shoehorn

      Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

      Also in 59 projects that use this

    • FabienDehopreSkill

      decision-mapping

      Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

      Also in 7 projects that use this

  • In this repository35 other files it gives its agents.

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.