DEPRECATED (removal target: v3.0.0) — Use for on-demand learnings retrieval and for phase-scoped context packets. This skill and the CLI command still work as compatibility adapters, but they are not the canonical context path and are not called from default hooks or other skills. Inject Skill On-demand knowledge retrieval. Not run automatically at startup (since ag-8km). It is read-only: it only reads knowledge for injection and never writes to . Load relevant prior knowledge into the current session as a legacy adapter. Lease | Field | Value | |---|---| | Lease | retire-candidate | | Replac…

\"\ncheck \"name is inject\" \"grep -q '^name: inject' '$SKILL_DIR/SKILL.md'\"\ncheck \"mentions knowledge\" \"grep -qi 'knowledge' '$SKILL_DIR/SKILL.md'\"\ncheck \"mentions .agents/ or session\" \"grep -qiE '\\\\.agents/|session' '$SKILL_DIR/SKILL.md'\"\n\necho \"\"; echo \"Results: $PASS passed, $FAIL failed\"\n[ $FAIL -eq 0 ] && exit 0 || exit 1\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":684,"content_sha256":"426d51fe5ad2efe4910864059ef691128ee5121355fce6e7cde45c8e69a37295"}],"content_json":{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"DEPRECATED (removal target: v3.0.0)","type":"text","marks":[{"type":"strong"}]},{"text":" — Use ","type":"text"},{"text":"ao lookup --query \"topic\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" for on-demand learnings retrieval and ","type":"text"},{"text":"ao context assemble","type":"text","marks":[{"type":"code_inline"}]},{"text":" for phase-scoped context packets. This skill and the ","type":"text"},{"text":"ao inject","type":"text","marks":[{"type":"code_inline"}]},{"text":" CLI command still work as compatibility adapters, but they are not the canonical context path and are not called from default hooks or other skills.","type":"text"}]}]},{"type":"heading","attrs":{"level":1},"content":[{"text":"Inject Skill","type":"text"}]},{"type":"paragraph","content":[{"text":"On-demand knowledge retrieval. Not run automatically at startup (since ag-8km).","type":"text","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"text":"It is read-only: it only reads knowledge for injection and never writes to ","type":"text"},{"text":".agents/","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"Load relevant prior knowledge into the current session as a legacy adapter.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Lease","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Field","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Value","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Lease","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"retire-candidate","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Replacement port","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"retrieve_context","type":"text","marks":[{"type":"code_inline"}]},{"text":" / ","type":"text"},{"text":"assemble_context","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Replacement adapters","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ao lookup","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"ao context assemble","type":"text","marks":[{"type":"code_inline"}]},{"text":", knowledge brief artifacts","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Current allowed use","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"manual compatibility lookup only","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Not allowed","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"default startup injection, hidden hook delivery, task planning","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"How It Works","type":"text"}]},{"type":"paragraph","content":[{"text":"In the default ","type":"text"},{"text":"manual","type":"text","marks":[{"type":"code_inline"}]},{"text":" startup mode, MEMORY.md is auto-loaded by Claude Code and no startup injection occurs. Prefer ","type":"text"},{"text":"ao lookup","type":"text","marks":[{"type":"code_inline"}]},{"text":" for on-demand retrieval and ","type":"text"},{"text":"ao context assemble","type":"text","marks":[{"type":"code_inline"}]},{"text":" when a phase needs a bounded packet. Use ","type":"text"},{"text":"/inject","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"ao inject","type":"text","marks":[{"type":"code_inline"}]},{"text":" only for legacy compatibility.","type":"text"}]},{"type":"paragraph","content":[{"text":"In ","type":"text"},{"text":"lean","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"legacy","type":"text","marks":[{"type":"code_inline"}]},{"text":" startup modes (set via ","type":"text"},{"text":"AGENTOPS_STARTUP_CONTEXT_MODE","type":"text","marks":[{"type":"code_inline"}]},{"text":"), the SessionStart hook runs:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# lean mode (MEMORY.md fresh): 400 tokens\nao inject --apply-decay --format markdown --max-tokens 400 \\\n [--bead \u003cbead-id>] [--predecessor \u003chandoff-path>]\n\n# legacy mode: 800 tokens\nao inject --apply-decay --format markdown --max-tokens 800 \\\n [--bead \u003cbead-id>] [--predecessor \u003chandoff-path>]","type":"text"}]},{"type":"paragraph","content":[{"text":"This legacy path searches for relevant knowledge and prints a bounded summary.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Work-Scoped Injection","type":"text"}]},{"type":"paragraph","content":[{"text":"When ","type":"text"},{"text":"--bead","type":"text","marks":[{"type":"code_inline"}]},{"text":" is provided (via ","type":"text"},{"text":"HOOK_BEAD","type":"text","marks":[{"type":"code_inline"}]},{"text":" env var from Gas Town):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Learnings tagged with the same bead ID get a 1.5x score boost","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Learnings matching bead labels get a 1.2x boost","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Untagged learnings still appear but ranked lower","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Predecessor Context","type":"text"}]},{"type":"paragraph","content":[{"text":"When ","type":"text"},{"text":"--predecessor","type":"text","marks":[{"type":"code_inline"}]},{"text":" is provided (path to a handoff file):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Extracts structured context: progress, blockers, next steps","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Injected as \"Predecessor Context\" section before learnings","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Supports explicit handoffs, auto-handoffs, and pre-compact snapshots","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Manual Execution","type":"text"}]},{"type":"paragraph","content":[{"text":"Given ","type":"text"},{"text":"/inject [topic]","type":"text","marks":[{"type":"code_inline"}]},{"text":":","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1: Search for Relevant Knowledge","type":"text"}]},{"type":"paragraph","content":[{"text":"With ao CLI:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"ao lookup --query \"\u003ctopic>\" --limit 5","type":"text"}]},{"type":"paragraph","content":[{"text":"Without ao CLI, search manually:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Global operating memory\nsed -n '1,120p' ~/.agents/MEMORY.md 2>/dev/null\n\n# Recent learnings\nls -lt .agents/learnings/ | head -5\n\n# Recent patterns\nls -lt .agents/patterns/ | head -5\n\n# Recent research\nls -lt .agents/research/ | head -5\n\n# Global learnings (cross-repo knowledge)\nls -lt ~/.agents/learnings/ 2>/dev/null | head -5\n\n# Global patterns (cross-repo patterns)\nls -lt ~/.agents/patterns/ 2>/dev/null | head -5\n\n# Legacy patterns (read-only fallback, no new writes)\nls -lt ~/.claude/patterns/ 2>/dev/null | head -5","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2: Read Relevant Files","type":"text"}]},{"type":"paragraph","content":[{"text":"Use the Read tool to load the most relevant artifacts based on topic.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 3: Summarize for Context","type":"text"}]},{"type":"paragraph","content":[{"text":"Present the injected knowledge:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Global principles or constraints that apply everywhere","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Key learnings relevant to current work","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Patterns that may apply","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Recent research on related topics","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 4: Record Citations (Feedback Loop)","type":"text"}]},{"type":"paragraph","content":[{"text":"After presenting injected knowledge, record which files were injected for the feedback loop:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"mkdir -p .agents/ao\n# Record each injected learning file as a citation\nfor injected_file in \u003clist of files that were read and presented>; do\n echo \"{\\\"artifact_path\\\": \\\"$injected_file\\\", \\\"cited_at\\\": \\\"$(date -Iseconds)\\\", \\\"session_id\\\": \\\"$(date +%Y-%m-%d)\\\", \\\"workspace_path\\\": \\\"$PWD\\\"}\" >> .agents/ao/citations.jsonl\ndone","type":"text"}]},{"type":"paragraph","content":[{"text":"Citation tracking enables the feedback loop: learnings that are frequently cited get confidence boosts during ","type":"text"},{"text":"/post-mortem","type":"text","marks":[{"type":"code_inline"}]},{"text":", while uncited learnings decay faster.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Knowledge Sources","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Source","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Location","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Priority","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Weight","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Global Memory","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~/.agents/MEMORY.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Highest","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"1.0","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Learnings","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":".agents/learnings/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"High","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"1.0","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Patterns","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":".agents/patterns/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"High","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"1.0","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Global Learnings","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~/.agents/learnings/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"High","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"0.8 (configurable)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Global Patterns","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~/.agents/patterns/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"High","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"0.8 (configurable)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Research","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":".agents/research/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Medium","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"—","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Retros","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":".agents/learnings/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Medium","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"—","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Legacy Patterns","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~/.claude/patterns/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Low","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"0.6 (read-only, no new writes)","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Decay Model","type":"text"}]},{"type":"paragraph","content":[{"text":"Knowledge relevance decays over time (~17%/week). More recent learnings are weighted higher.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Key Rules","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Does not run automatically","type":"text","marks":[{"type":"strong"}]},{"text":" - default context delivery is explicit","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Context-aware","type":"text","marks":[{"type":"strong"}]},{"text":" - filters by current directory/topic","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Token-budgeted","type":"text","marks":[{"type":"strong"}]},{"text":" - respects max-tokens limit","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Recency-weighted","type":"text","marks":[{"type":"strong"}]},{"text":" - newer knowledge prioritized","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Examples","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"SessionStart Hook Invocation (lean/legacy modes only)","type":"text"}]},{"type":"paragraph","content":[{"text":"Hook triggers:","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":"session-start.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":" runs at session start with ","type":"text"},{"text":"AGENTOPS_STARTUP_CONTEXT_MODE=lean","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"legacy","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"What happens:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Hook calls ","type":"text"},{"text":"ao inject --apply-decay --format markdown --max-tokens 400","type":"text","marks":[{"type":"code_inline"}]},{"text":" (lean) or ","type":"text"},{"text":"--max-tokens 800","type":"text","marks":[{"type":"code_inline"}]},{"text":" (legacy)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CLI searches ","type":"text"},{"text":".agents/learnings/","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".agents/patterns/","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".agents/research/","type":"text","marks":[{"type":"code_inline"}]},{"text":" for relevant artifacts","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CLI applies recency-weighted decay (~17%/week) to rank results","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CLI outputs top-ranked knowledge as markdown within token budget","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent presents injected knowledge in session context","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Result:","type":"text","marks":[{"type":"strong"}]},{"text":" Prior learnings, patterns, and research are available for legacy hook profiles. This is not the default AgentOps 3.0 path.","type":"text"}]},{"type":"paragraph","content":[{"text":"Note:","type":"text","marks":[{"type":"strong"}]},{"text":" In the default ","type":"text"},{"text":"manual","type":"text","marks":[{"type":"code_inline"}]},{"text":" mode, MEMORY.md is auto-loaded by Claude Code and this hook emits only a pointer to on-demand retrieval commands (","type":"text"},{"text":"ao search","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"ao lookup","type":"text","marks":[{"type":"code_inline"}]},{"text":").","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Manual Context Injection","type":"text"}]},{"type":"paragraph","content":[{"text":"User says:","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":"/inject authentication","type":"text","marks":[{"type":"code_inline"}]},{"text":" or \"recall knowledge about auth\"","type":"text"}]},{"type":"paragraph","content":[{"text":"What happens:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent calls ","type":"text"},{"text":"ao lookup --query \"authentication\" --limit 5","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CLI filters artifacts by topic relevance","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent reads top-ranked learnings and patterns","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent summarizes injected knowledge for current work","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent references artifact paths for deeper exploration","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Result:","type":"text","marks":[{"type":"strong"}]},{"text":" Topic-specific knowledge retrieved and summarized, enabling faster context loading than full artifact reads.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Troubleshooting","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Problem","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cause","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Solution","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"No knowledge injected","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Empty knowledge pools or ao CLI unavailable","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Run ","type":"text"},{"text":"/post-mortem","type":"text","marks":[{"type":"code_inline"}]},{"text":" to seed pools; verify ao CLI installed","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Irrelevant knowledge","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Topic mismatch or stale artifacts dominate","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"--context \"\u003ctopic>\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" to filter; prune stale artifacts","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Token budget exceeded","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Too many high-relevance artifacts","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Reduce ","type":"text"},{"text":"--max-tokens","type":"text","marks":[{"type":"code_inline"}]},{"text":" or increase topic specificity","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Decay too aggressive","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Recent learnings not prioritized","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Check artifact modification times; verify ","type":"text"},{"text":"--apply-decay","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Documents","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/inject-cli.feature","type":"text","marks":[{"type":"link","attrs":{"href":"references/inject-cli.feature","title":null}}]},{"text":" — Executable spec: ","type":"text"},{"text":"ao inject","type":"text","marks":[{"type":"code_inline"}]},{"text":" CLI command behavior (header, JSON contract, ","type":"text"},{"text":"--for","type":"text","marks":[{"type":"code_inline"}]},{"text":" filtering), linked to cmd tests (soc-jnfgi)","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"inject","author":"@skillopedia","source":{"stars":375,"repo_name":"agentops","origin_url":"https://github.com/boshu2/agentops/blob/HEAD/packs/agentops/overlay/.claude/skills/inject/SKILL.md","repo_owner":"boshu2","body_sha256":"d8ec63d380125bc6997066377a71c298910b805ebb3c48f20d7694d6e3c44220","cluster_key":"2260544d963104b03740ba01f7f8b291eced847a446f408c936e319211702dc2","clean_bundle":{"format":"clean-skill-bundle-v1","source":"boshu2/agentops/packs/agentops/overlay/.claude/skills/inject/SKILL.md","attachments":[{"id":"fcfe8fdc-0e54-5b7d-b1cf-271d12dbc1c2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/fcfe8fdc-0e54-5b7d-b1cf-271d12dbc1c2/attachment","path":"references/.gitkeep","size":0,"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","contentType":"text/plain; charset=utf-8"},{"id":"4d38a1af-2773-505a-90c8-2f2990c9993a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/4d38a1af-2773-505a-90c8-2f2990c9993a/attachment.feature","path":"references/inject-cli.feature","size":2676,"sha256":"9a902b17bc68714943bf96eb907262345e4c1d9b59a778fb9ecb10d4bf150a6a","contentType":"text/plain; charset=utf-8"},{"id":"030cffea-c3da-5317-8c3f-8ce6d4a3288e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/030cffea-c3da-5317-8c3f-8ce6d4a3288e/attachment.sh","path":"scripts/validate.sh","size":684,"sha256":"426d51fe5ad2efe4910864059ef691128ee5121355fce6e7cde45c8e69a37295","contentType":"application/x-sh; charset=utf-8"}],"bundle_sha256":"0396d4458fda72466ba4748ae975ea19cc2d8a2b387fba72594bf1dc81b63e3e","attachment_count":3,"text_attachments":1,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":2,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"packs/agentops/overlay/.claude/skills/inject/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"general","category_label":"General"},"exact_dupes_collapsed_into_this":0},"context":{"intent":{"mode":"none"},"window":"fork","sections":{"exclude":["TASK"]},"intel_scope":"full"},"version":"v1","category":"general","consumes":[],"metadata":{"tier":"background","internal":true,"dependencies":[]},"produces":[],"practices":["wiki-knowledge-surface","pragmatic-programmer"],"import_tag":"clean-skills-v1","context_rel":[],"description":"Load relevant .agents context.","hexagonal_role":"driving-adapter","user-invocable":false,"output_contract":"stdout: injected knowledge summary","skill_api_version":1}},"renderedAt":1782979722090}

DEPRECATED (removal target: v3.0.0) — Use for on-demand learnings retrieval and for phase-scoped context packets. This skill and the CLI command still work as compatibility adapters, but they are not the canonical context path and are not called from default hooks or other skills. Inject Skill On-demand knowledge retrieval. Not run automatically at startup (since ag-8km). It is read-only: it only reads knowledge for injection and never writes to . Load relevant prior knowledge into the current session as a legacy adapter. Lease | Field | Value | |---|---| | Lease | retire-candidate | | Replac…