AGENT SKILL

cross-project-forge

Manual pipeline promoting a recurring pattern to an auto-generated skill when it hits severity threshold.

License 许可
Apache-2.0
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
cross-project-forge
triggers
forge, promote pattern, auto-skill, forjar, convertir patrón, skill desde patrón, cross-project-forge
changelog
docs/ciclos/cycle28-20260815.md
description
Manual pipeline promoting a recurring pattern to an auto-generated skill when it hits severity threshold.
token_budget
2634

03 SKILL.md 正文

When to Use

Check severity threshold (ready to forge?):

Severity Min ocurrences Min projects
CRITICAL 1 1
HIGH 2 2
MEDIUM (default) 3 2
LOW 5 3
If threshold NOT met → abort. Inform user: "Pattern needs {N} more occurrences across {M} more projects."

Pipeline

1. GENERATE

From pattern JSON → SKILL.md structure:

name: cross-project-{pattern.id.slug}
description: "{pattern.rule.summary}" (≤120 chars)
triggers: "{pattern.tags + pattern.signal.keywords}"
rules: "{pattern.rule.fix generalized} + {pattern.rule.check generalized}"

2. QUALITY GATES (all mandatory)

  • [ ] YAML frontmatter parses
  • [ ] name has cross-project- prefix (avoids collision)
  • [ ] description ≤ 120 chars
  • [ ] triggers not empty, no dupe with existing skill triggers
  • [ ] rules ≥ 1 executable rule (imperative verb + condition)
  • [ ] No contradictions with existing skills
  • [ ] SKILL.md ≤ 2KB (auto-Karpathy-compress if exceeds)
  • [ ] skill-graph resolves this skill for its triggers
  • [ ] No secrets, no absolute paths

3. REGISTER

  1. Create .agents/skills/cross-project-{name}/SKILL.md
  2. skill-registry scan → detects new skill
  3. skill-graph re-scan → adds to resolver (lazy-load, not auto-load)
  4. Update AGENTS.md: add to Skill Router if appropriate

4. PERSIST

mem_save(topic_key="forge/{name}", content="forge metadata here", type="architecture", scope="personal")

Update pattern JSON:

  • status → "promoted"
  • Add skill_ref: "cross-project-{name}"

Reference

docs/skills/cross-project-forge/reference.md

Anti-Rationalization

Rationalization Red Flag Verification
"forjar skill bajo el threshold de severidad" Pipeline inicia sin threshold met When to Use table: min occurrences/projects verificado
"saltarse quality gates por urgencia" SKILL.md sin frontmatter/parses o gates unchecked Quality Gates 9 checks mandatory (YAML, prefix, ≤120ch...)
"hardcodear paths absolutos" Paths absolutos en rules/triggers Gate: No secrets, no absolute paths + skill-graph resolves

Red Flags

  • Doing work without checking output format → STOP, re-read skill
  • Second occurrence of same rationalization → force RED zone

Verification

  • Output matches skill ## Output contract + file:line citaton
  • cross-ref-check.ps1 → SKILL.md OK

Refs

Cross-Refs: cross-project-wisdom | skill-registry

04 同仓库更多 Skills