learn
Extract instincts from the current session — corrections, confirmations, and tool-usage patterns
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Extract instincts from the current session — corrections, confirmations, and tool-usage patterns
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
A pre-publish checkpoint for a client blog/content draft — grammar and mechanics, brand voice against a per-client profile, and factual claims checked against the client's own site — that ends in one verdict a VA or owner can act on without reading the whole report: SHIP / SHIP WITH FIXES / HOLD. Use when a user asks to "QA this draft," "check this post before it goes live," "run content QA for [client]," "does this sound like [client]," or wants a pre-publish gate so nothing ships with an embarrassing factual miss, an off-voice line, or a typo in the headline.
A local tabbed dashboard showing all six AMM Founding Circle tools' reports in one place (Connection Sentinel, Bug Hunter, Content QA, Lead Grader, Penny Dashboard, Outbound Engine), each with a Refresh button that re-runs that tool's own command and pulls its latest report back in. Use when a member wants one place to check every tool at a glance instead of hunting down six separate report files, when presenting results live to a client or teammate, or when a specific tool's tab needs re-running after config changes.
Find the ghost tokens. Audit Claude Code or Codex setup, see where context goes, fix it. Use when context feels tight.
Compute per-client cost/billing profitability (Penny Dashboard) and generate an internal owner view plus a locked-down, client-safe HTML page per client. Use when an agency owner asks to run their Penny Dashboard, check which clients are unprofitable, see margin by client, or generate a client-safe cost/spend page to send a client.
Sweep every client site and Google Ads account for real, client-visible errors — broken links, disapproved ads, dead tracking tags, broken redirect chains. Use when the user says "run my bug hunt", "sweep my clients", "check my client sites for errors", "audit my Google Ads accounts for problems", or wants to know what's broken before a client finds it. Read-only — never edits, pauses, or posts anything.
An always-on checker that pings every API/MCP connection your automations depend on and alerts you the moment one silently dies -- email + macOS notification, plus a tiny local status board. Use when you want to know instantly if a connection (Search Atlas MCP, Google Ads, GA4, Meta, CallRail, Smartlead, ClickUp, Slack, or anything else) has gone down, when a scheduled automation "seems quiet" and you need ground truth instead of guessing, or when you're setting up your first always-on agent and want a watch on it from day one.
| name | learn |
| description | Extract instincts from the current session — corrections, confirmations, and tool-usage patterns |
| argument-hint | [--project-only] |
| allowed-tools | ["Read","Write","Bash","Grep","Glob"] |
You are extracting instincts — learned behavioral rules that improve future sessions. Be conservative. Only extract clear, repeatable patterns, never one-off instructions or obvious behaviors.
First, determine the current date and session scope:
TODAY=$(date +%Y-%m-%d)
MONTH=$(date +%Y-%m)
EVENT_LOG="$HOME/.claude/instincts/events/${MONTH}.ndjson"
Read the event log if it exists (filter to today's entries):
if [ -f "$EVENT_LOG" ]; then
grep "\"$TODAY" "$EVENT_LOG" | tail -100
fi
Then review the current conversation for these signal categories:
Also check for any --project-only flag in the invocation arguments. If present, only extract project-scoped instincts.
For each detected pattern, formulate it as a structured behavioral rule:
always-run-ruff-after-python-edit)Be specific. "Be careful with files" is useless. "Run ruff check after every Python file edit in this project" is an instinct.
For each candidate instinct, check against existing instincts using the similarity utility:
python3 -c "
import sys; sys.path.insert(0, '$HOME/.claude/instincts/lib')
from similarity import find_similar
results = find_similar('<candidate_rule_text>', '$HOME/.claude/instincts/global/')
for r in results: print(f'{r[\"id\"]}|{r[\"similarity\"]:.2f}|{r[\"name\"]}')
"
If the similarity library is not available, fall back to a manual grep-based search:
grep -rl '<key_phrase>' ~/.claude/instincts/global/ ~/.claude/instincts/projects/ 2>/dev/null
Decision logic:
confirmations or corrections count, update updated_at timestamp. Do NOT create a duplicate.Generate a unique ID for each new instinct:
SUFFIX=$(python3 -c "import secrets; print(secrets.token_hex(2))")
ID="INS-$(date +%Y%m%d)-${SUFFIX}"
Determine scope:
~/.claude/instincts/projects/<project-slug>/ if the pattern is specific to the current project (references project-specific files, tools, APIs, or conventions).~/.claude/instincts/global/ if the pattern is universal (general coding practices, tool usage patterns, communication preferences).--project-only was passed, always use project scope.Derive <project-slug> from the current working directory's basename or git remote name.
Create the instinct file at the appropriate path using this exact format:
---
id: <ID>
name: "<kebab-case-name>"
description: "<one-line summary>"
type: feedback
scope: project|global
status: candidate
confidence: 0.50
score:
successes: 0
failures: 0
confirmations: 1
corrections: 0
last_applied_at: "<ISO-8601 timestamp>"
half_life_days: 21
decay_floor: 0.05
signals:
trigger_patterns:
- "<pattern1>"
- "<pattern2>"
anti_patterns: []
evidence:
- session: "<session_id_or_date>"
kind: correction|confirmation|pattern
summary: "<what happened>"
ts: "<ISO-8601 timestamp>"
lineage:
parent_ids: []
cluster_id: null
promoted_from: null
version: 1
created_at: "<ISO-8601 timestamp>"
updated_at: "<ISO-8601 timestamp>"
---
## Operational Rule
<The behavioral rule — a clear, prescriptive instruction that an AI agent can follow.
Write it as an imperative: "Always X when Y" or "Never X unless Y".
Include the WHY if it is not obvious.>
Set initial confidence based on evidence strength:
Ensure the appropriate INSTINCTS.md index file exists (create if needed):
~/.claude/instincts/global/INSTINCTS.md for global instincts~/.claude/instincts/projects/<slug>/INSTINCTS.md for project instinctsAppend one line per new or updated instinct:
- <ID> | <status> | <confidence> | "<name>" | created <YYYY-MM-DD>
For merged/updated instincts, find and replace the existing line with updated confidence.
Output a clear summary:
## Instinct Extraction Report
**Session**: <date>
**Scope**: <global|project|both>
### New Instincts Created (N)
- INS-XXXXXXXX-XXXX | "<name>" | confidence: 0.XX | scope: <scope>
→ "<one-line description>"
### Existing Instincts Updated (N)
- INS-XXXXXXXX-XXXX | "<name>" | confidence: 0.XX → 0.XX
→ merged evidence from this session
### Skipped (N)
- "<pattern>" — reason: <too weak / one-off / already covered by INS-XXX>
If no instincts were extracted, say so honestly and explain why (e.g., "Session was straightforward with no corrections or non-obvious confirmations").
mkdir -p).