You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(skills): add comprehensive style guide for cookbook audits (anthropics#272)
* feat(skills): add comprehensive style guide for cookbook audits
* fix(ci): resolve lychee "No links were found" error
Fixed two issues in the link checking workflow:
1. **Fixed bash variable scoping bug**: The while-read loop was running in a
subshell, causing FILES variable assignments to be lost. Changed to use
process substitution (< <(...)) to keep the loop in the current shell.
2. **Added failIfEmpty: false**: Added this parameter to both lychee-action
invocations to prevent failures when no links are found (legitimate for
some PRs).
3. **Skip lychee when no files**: Added has_files output and conditional
check to skip the lychee step entirely when no markdown files are found.
4. **Exclude .claude/ directory**: Added .claude/ to lychee.toml exclude_path
since it contains tooling/config files that don't need link checking.
These changes ensure the link checker works correctly for PRs that only
modify files in excluded directories or files without external links.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
@@ -7,24 +7,33 @@ description: Audit an Anthropic Cookbook notebook based on a rubric. Use wheneve
7
7
8
8
## Instructions
9
9
10
-
Review the requested Cookbook notebook using the following guidelines. Provide a score based on scoring guidelines and recommendations on improving the cookbook.
10
+
Review the requested Cookbook notebook using the guidelines and rubrics in `style_guide.md`. Provide a score based on scoring guidelines and recommendations on improving the cookbook.
11
+
12
+
The style guide provides detailed templates and examples for:
13
+
- Problem-focused introductions with Terminal Learning Objectives (TLOs) and Enabling Learning Objectives (ELOs)
14
+
- Prerequisites and setup patterns
15
+
- Core content structure
16
+
- Conclusions that map back to learning objectives
17
+
18
+
**IMPORTANT**: Always read `style_guide.md` first before conducting an audit. The style guide contains the canonical templates and good/bad examples to reference.
11
19
12
20
## Workflow
13
21
14
22
Follow these steps for a comprehensive audit:
15
23
16
-
1.**Identify the notebook**: Ask user for path if not provided
17
-
2.**Run automated checks**: Use `python3 validate_notebook.py <path>` to catch technical issues and generate markdown
24
+
1.**Read the style guide**: First review `style_guide.md` to understand current best practices
25
+
2.**Identify the notebook**: Ask user for path if not provided
26
+
3.**Run automated checks**: Use `python3 validate_notebook.py <path>` to catch technical issues and generate markdown
18
27
- The script automatically runs detect-secrets to scan for hardcoded API keys and credentials
19
28
- Uses custom patterns defined in `scripts/detect-secrets/plugins.py`
20
29
- Checks against baseline at `scripts/detect-secrets/.secrets.baseline`
21
-
3.**Review markdown output**: The script generates a markdown file in the `tmp/` folder for easier review (saves context vs raw .ipynb)
30
+
4.**Review markdown output**: The script generates a markdown file in the `tmp/` folder for easier review (saves context vs raw .ipynb)
22
31
- The tmp/ folder is gitignored to avoid committing review artifacts
23
32
- Markdown includes code cells but excludes outputs for cleaner review
24
-
4.**Manual review**: Read through the markdown version evaluating against rubric
25
-
5.**Score each dimension**: Apply scoring guidelines objectively
26
-
6.**Generate report**: Follow the audit report format below
27
-
7.**Provide specific examples**: Show concrete improvements with line references
33
+
5.**Manual review**: Read through the markdown version evaluating against style guide and rubric
34
+
6.**Score each dimension**: Apply scoring guidelines objectively
35
+
7.**Generate report**: Follow the audit report format below
36
+
8.**Provide specific examples**: Show concrete improvements with line references using the style guide templates
28
37
29
38
## Audit Report Format
30
39
@@ -61,12 +70,34 @@ Present your audit using this structure:
61
70
62
71
Use this to ensure comprehensive coverage:
63
72
73
+
**Introduction** (See style_guide.md Section 1)
74
+
-[ ] Hooks with the problem being solved (1-2 sentences)
75
+
-[ ] Explains why it matters (1-2 sentences)
76
+
-[ ] Lists learning objectives as bullet points (2-4 TLOs/ELOs)
77
+
-[ ] Focuses on value delivered, not machinery built
- Could benefit from a limitations section discussing when NOT to use this approach
210
-
211
-
#### Detailed Scoring
212
-
213
-
**1. Narrative Quality: 5/5**
214
-
Opens with clear problem statement about reducing support ticket volume. Each section builds logically. Concludes with discussion of production considerations.
215
-
216
-
**2. Code Quality: 4/5**
217
-
Excellent structure and naming. Clean, idiomatic code. Model defined as constant. Minor issue: pip install output not suppressed in cells 1-2.
218
-
219
-
**3. Technical Accuracy: 5/5**
220
-
Demonstrates best practices for tool use. Appropriate model selection (using valid claude-sonnet-4-5 model). Correct API usage with streaming.
221
-
222
-
**4. Actionability & Understanding: 4/5**
223
-
Very practical with clear adaptation points. Explains why tool schemas are designed certain ways. Could add more discussion on when this approach isn't suitable.
224
-
225
-
#### Specific Recommendations
226
-
1. Add `%%capture` to cells 1-2 to suppress pip install logs
227
-
2. Add "Limitations & Considerations" section discussing scenarios where simpler approaches might be better
228
-
3. Consider adding a "Variations" section showing how to adapt for different support scenarios
229
-
230
-
---
231
-
232
-
### Example 2: Needs Improvement Notebook Audit (Score: 11/20)
233
-
234
-
**Notebook**: "Text Classification with Claude"
235
-
236
-
#### Executive Summary
237
-
-**Overall Score**: 11/20
238
-
-**Key Strengths**:
239
-
- Working code that demonstrates basic classification
240
-
- Covers multiple classification approaches
241
-
-**Critical Issues**:
242
-
- No introduction explaining use case or prerequisites
243
-
- Code blocks lack explanatory text
244
-
- No discussion of why approaches work or when to use them
245
-
- Missing error handling and best practices
246
-
247
-
#### Detailed Scoring
248
-
249
-
**1. Narrative Quality: 2/5**
250
-
Jumps directly into code without context. No introduction explaining what problem this solves or who it's for. Sections lack connecting narrative.
251
-
252
-
**2. Code Quality: 3/5**
253
-
Code is functional but lacks structure. Variable names like `x1`, `result`, `temp` are unclear. No comments explaining non-obvious choices. Model not defined as constant at top.
254
-
255
-
**3. Technical Accuracy: 3/5**
256
-
API calls work but use invalid or deprecated model names. Model selection not explained. No discussion of token efficiency or performance.
257
-
258
-
**4. Actionability & Understanding: 3/5**
259
-
Shows multiple approaches but doesn't explain when to use each. No discussion of trade-offs. Unclear how to adapt to different classification tasks.
0 commit comments