Refresh Context & Audit Workflow
Skill Metadata
- Name: refresh
- Type: Procedural workflow for context loading and compliance audit
- Auto-trigger: Session startup (light mode), User signals (full mode)
- User signals: "check your work", "that's not right", "read the guidelines", "look again"
Purpose
Reload behavioral guidelines, report available capabilities, and audit recent actions for compliance with meta-CLAUDE.md requirements. Use this when Claude violates guidelines or at session start to establish context.
When to Use
Automatic (Light Mode - Session Startup):
- Re-read meta-CLAUDE.md
- Report available skills and MCPs
- No audit of recent actions
Manual Trigger (Full Mode - User Invoked):
- User types
/refresh
- User says "check your work" or similar
- Claude detects it may have violated guidelines
- After corrective feedback from user
Workflow
Phase 1: Reload Guidelines (All Modes)
- Read
~/dotfiles/ai/docs/meta-CLAUDE.md
- Report last modified date
- Confirm loaded successfully
- Note key sections: Communication, Git Workflow, Code Change Approval
Phase 2: Inventory Capabilities (All Modes)
List Available Skills
- Check
<available_skills> in system prompt (what Claude can actually invoke)
- Scan
~/.claude/skills/*/SKILL.md on filesystem (what exists on disk)
- Use
find -L to follow symlinks (skills directory is symlinked)
- Command:
find -L ~/.claude/skills -name 'SKILL.md'
- Report both counts to detect registration issues
- Format:
skill-name: brief description
Check MCP Servers
- List configured MCP servers
- Show tool count per server
- Note: tree-sitter, repomix, context7, memory, postgres-mcp
Phase 3: Audit Recent Actions (Full Mode Only)
Check Last Git Commit (if any in current session)
- Run
git log -1 --format='%s%n%n%b'
- Verify commit message format matches meta-CLAUDE.md:
- Brief descriptive title
- Optional body
- Ends with "By PB & Claude"
- NO "Co-authored-by:" lines
- NO tool attribution (🤖 Generated with...)
- If violations found: Offer to amend commit
Check Recently Modified Files
- Run
git diff --name-only HEAD~1..HEAD (if committed)
- Or use session memory of files modified
- For each file, verify header format matches language:
- Python:
# Author: PB and Claude
- Markdown:
<!-- Author: PB and Claude -->
- Etc.
- If violations found: Offer to fix headers
Check for Unauthorized Changes
- Review what was changed vs. what was requested
- Flag if changes went beyond explicit request
- Remind: "ONLY modify what is explicitly requested"
Phase 4: Report (All Modes)
Light Mode Output (Startup):
Context loaded
├─ meta-CLAUDE.md (2025-11-06)
├─ Skills: 6 registered, 8 on disk
│ ├─ Registered: commit, code-change-approval, code-explore
│ │ context7, memory-augmented-dev, new-file
│ └─ On disk only: postgres-optimization, refresh
├─ MCPs: 5 connected (tree-sitter, repomix, context7, memory, postgres)
└─ Working in: ~/docs
Full Mode Output (Manual/Audit):
Context refreshed - Full audit
Guidelines: meta-CLAUDE.md (2025-11-06) ✓
Skills: 6 registered, 8 on disk
├─ Registered (invokable):
│ ├─ commit: Git commit workflow
│ ├─ code-change-approval: File modification approval
│ ├─ code-explore: Codebase exploration
│ ├─ context7: Library documentation
│ ├─ memory-augmented-dev: Persistent memory
│ └─ new-file: File creation with headers
└─ On disk only (not loaded):
├─ postgres-optimization
└─ refresh
MCPs: 5 connected
├─ tree-sitter (26 tools)
├─ repomix (7 tools)
├─ context7 (2 tools)
├─ memory (14 tools)
└─ postgres (10 tools)
Recent Actions Audit:
├─ Last commit: [commit hash]
│ └─ ✗ Violation: Contains "Co-authored-by:" line
│ └─ Should I amend this commit?
├─ Modified files: src/foo.py
│ └─ ✓ File header present and correct
└─ Change scope: ✓ Only requested changes made
Working in: ~/docs (clean)
Phase 5: Corrective Actions (Full Mode, If Violations Found)
If commit message violations detected:
- Ask: "Should I amend the last commit to fix the message format?"
- If yes: Use
git commit --amend with corrected message
- Check authorship first (never amend others' commits)
If file header violations detected:
- Ask: "Should I add/fix headers in [file list]?"
- If yes: Use Edit tool to add proper headers
Communication Style
- No flattery or praise - Just report facts
- Concise - Structured output, not verbose explanations
- Action-oriented - If violations found, offer specific fixes
- Professional peer - "Should I fix this?" not "Let me fix that for you!"
Implementation Notes
Trigger Detection:
- Detect phrases like: "check your work", "that's not right", "read the guidelines", "what are your instructions", "check meta-CLAUDE"
- When detected: Execute full audit mode automatically
Startup Behavior:
- Light mode on session start
- Don't audit actions from previous sessions
- Just establish current context and capabilities
Audit Scope:
- Only audit current session actions
- For commits: Check last 1 commit if made in this session
- For files: Check files modified in this session
- Don't audit historical work
Skill Sources:
<available_skills> in system prompt = skills Claude can actually invoke via Skill tool
- Filesystem
~/.claude/skills/*/SKILL.md = skill definitions on disk
- IMPORTANT: Use
find -L when scanning skills directory (it's a symlink to dotfiles)
- Discrepancies indicate skills that exist but aren't registered (need debugging)
Error Handling
- If meta-CLAUDE.md not found: Report clearly, suggest location
- If skills directory empty: Report and continue
- If MCP servers unavailable: Note which ones, continue
- If git not available or no repo: Skip git-related checks
1---2name: refresh-23description: Reload behavioral guidelines and audit recent actions for compliance4---5
6# Refresh Context & Audit Workflow
7
8## Skill Metadata
9- **Name**: refresh
10- **Type**: Procedural workflow for context loading and compliance audit
11- **Auto-trigger**: Session startup (light mode), User signals (full mode)
12- **User signals**: "check your work", "that's not right", "read the guidelines", "look again"
13
14## Purpose
15
16Reload behavioral guidelines, report available capabilities, and audit recent actions for compliance with meta-CLAUDE.md requirements. Use this when Claude violates guidelines or at session start to establish context.
17
18## When to Use
19
20**Automatic (Light Mode - Session Startup):**
21- Re-read meta-CLAUDE.md
22- Report available skills and MCPs
23- No audit of recent actions
24
25**Manual Trigger (Full Mode - User Invoked):**
26- User types `/refresh`
27- User says "check your work" or similar
28- Claude detects it may have violated guidelines
29- After corrective feedback from user
30
31## Workflow
32
33### Phase 1: Reload Guidelines (All Modes)
34
351. Read `~/dotfiles/ai/docs/meta-CLAUDE.md`
36 - Report last modified date
37 - Confirm loaded successfully
38 - Note key sections: Communication, Git Workflow, Code Change Approval
39
40### Phase 2: Inventory Capabilities (All Modes)
41
422. List Available Skills
43 - Check `<available_skills>` in system prompt (what Claude can actually invoke)
44 - Scan `~/.claude/skills/*/SKILL.md` on filesystem (what exists on disk)
45 * Use `find -L` to follow symlinks (skills directory is symlinked)
46 * Command: `find -L ~/.claude/skills -name 'SKILL.md'`
47 - Report both counts to detect registration issues
48 - Format: `skill-name: brief description`
49
503. Check MCP Servers
51 - List configured MCP servers
52 - Show tool count per server
53 - Note: tree-sitter, repomix, context7, memory, postgres-mcp
54
55### Phase 3: Audit Recent Actions (Full Mode Only)
56
574. Check Last Git Commit (if any in current session)
58 - Run `git log -1 --format='%s%n%n%b'`
59 - Verify commit message format matches meta-CLAUDE.md:
60 * Brief descriptive title
61 * Optional body
62 * Ends with "By PB & Claude"
63 * NO "Co-authored-by:" lines
64 * NO tool attribution (🤖 Generated with...)
65 - If violations found: **Offer to amend commit**
66
675. Check Recently Modified Files
68 - Run `git diff --name-only HEAD~1..HEAD` (if committed)
69 - Or use session memory of files modified
70 - For each file, verify header format matches language:
71 * Python: `# Author: PB and Claude`
72 * Markdown: `<!-- Author: PB and Claude -->`
73 * Etc.
74 - If violations found: **Offer to fix headers**
75
766. Check for Unauthorized Changes
77 - Review what was changed vs. what was requested
78 - Flag if changes went beyond explicit request
79 - Remind: "ONLY modify what is explicitly requested"
80
81### Phase 4: Report (All Modes)
82
83**Light Mode Output (Startup):**
84```
85Context loaded
86├─ meta-CLAUDE.md (2025-11-06)
87├─ Skills: 6 registered, 8 on disk
88│ ├─ Registered: commit, code-change-approval, code-explore
89│ │ context7, memory-augmented-dev, new-file
90│ └─ On disk only: postgres-optimization, refresh
91├─ MCPs: 5 connected (tree-sitter, repomix, context7, memory, postgres)
92└─ Working in: ~/docs
93```
94
95**Full Mode Output (Manual/Audit):**
96```
97Context refreshed - Full audit
98
99Guidelines: meta-CLAUDE.md (2025-11-06) ✓
100
101Skills: 6 registered, 8 on disk
102├─ Registered (invokable):
103│ ├─ commit: Git commit workflow
104│ ├─ code-change-approval: File modification approval
105│ ├─ code-explore: Codebase exploration
106│ ├─ context7: Library documentation
107│ ├─ memory-augmented-dev: Persistent memory
108│ └─ new-file: File creation with headers
109└─ On disk only (not loaded):
110 ├─ postgres-optimization
111 └─ refresh
112
113MCPs: 5 connected
114├─ tree-sitter (26 tools)
115├─ repomix (7 tools)
116├─ context7 (2 tools)
117├─ memory (14 tools)
118└─ postgres (10 tools)
119
120Recent Actions Audit:
121├─ Last commit: [commit hash]
122│ └─ ✗ Violation: Contains "Co-authored-by:" line
123│ └─ Should I amend this commit?
124├─ Modified files: src/foo.py
125│ └─ ✓ File header present and correct
126└─ Change scope: ✓ Only requested changes made
127
128Working in: ~/docs (clean)
129```
130
131### Phase 5: Corrective Actions (Full Mode, If Violations Found)
132
1337. If commit message violations detected:
134 - Ask: "Should I amend the last commit to fix the message format?"
135 - If yes: Use `git commit --amend` with corrected message
136 - Check authorship first (never amend others' commits)
137
1388. If file header violations detected:
139 - Ask: "Should I add/fix headers in [file list]?"
140 - If yes: Use Edit tool to add proper headers
141
142## Communication Style
143
144- **No flattery or praise** - Just report facts
145- **Concise** - Structured output, not verbose explanations
146- **Action-oriented** - If violations found, offer specific fixes
147- **Professional peer** - "Should I fix this?" not "Let me fix that for you!"
148
149## Implementation Notes
150
151**Trigger Detection:**
152- Detect phrases like: "check your work", "that's not right", "read the guidelines", "what are your instructions", "check meta-CLAUDE"
153- When detected: Execute full audit mode automatically
154
155**Startup Behavior:**
156- Light mode on session start
157- Don't audit actions from previous sessions
158- Just establish current context and capabilities
159
160**Audit Scope:**
161- Only audit current session actions
162- For commits: Check last 1 commit if made in this session
163- For files: Check files modified in this session
164- Don't audit historical work
165
166**Skill Sources:**
167- `<available_skills>` in system prompt = skills Claude can actually invoke via Skill tool
168- Filesystem `~/.claude/skills/*/SKILL.md` = skill definitions on disk
169- **IMPORTANT**: Use `find -L` when scanning skills directory (it's a symlink to dotfiles)
170- Discrepancies indicate skills that exist but aren't registered (need debugging)
171
172## Error Handling
173
174- If meta-CLAUDE.md not found: Report clearly, suggest location
175- If skills directory empty: Report and continue
176- If MCP servers unavailable: Note which ones, continue
177- If git not available or no repo: Skip git-related checks