Cookbook audit

From Microck/ordinary-claude-skills · View interactive version

Cookbook audit is an AI agent skill from the GitHub repository Microck/ordinary-claude-skills. Audit an Anthropic Cookbook notebook based on a rubric. Use whenever a notebook review or audit is requested.

How to use this skill

Skill file

Cookbook Audit

Instructions

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.

The style guide provides detailed templates and examples for:

IMPORTANT: Always read style_guide.md first before conducting an audit. The style guide contains the canonical templates and good/bad examples to reference.

Workflow

Follow these steps for a comprehensive audit:

  1. Read the style guide: First review style_guide.md to understand current best practices
  2. Identify the notebook: Ask user for path if not provided
  3. Run automated checks: Use python3 validate_notebook.py <path> to catch technical issues and generate markdown
  1. Review markdown output: The script generates a markdown file in the tmp/ folder for easier review (saves context vs raw .ipynb)
  1. Manual review: Read through the markdown version evaluating against style guide and rubric
  2. Score each dimension: Apply scoring guidelines objectively
  3. Generate report: Follow the audit report format below
  4. Provide specific examples: Show concrete improvements with line references using the style guide templates

Audit Report Format

Present your audit using this structure:

Executive Summary

Detailed Scoring

1. Narrative Quality: X/5

[Brief justification with specific examples]

2. Code Quality: X/5

[Brief justification with specific examples]

3. Technical Accuracy: X/5

[Brief justification with specific examples]

4. Actionability & Understanding: X/5

[Brief justification with specific examples]

Specific Recommendations

[Prioritized, actionable list of improvements with references to specific sections]

Examples & Suggestions

[Show specific excerpts from the notebook with concrete suggestions for improvement]

Quick Reference Checklist

Use this to ensure comprehensive coverage:

Introduction (See style_guide.md Section 1)

Prerequisites & Setup (See style_guide.md Section 2)

Structure & Organization

Conclusion (See style_guide.md Section 4)

Code Quality

Output Management

Content Quality

Technical Requirements

Content Philosophy: Action + Understanding

Cookbooks are primarily action-oriented but strategically incorporate understanding and informed by Diataxis framework.

Core Principles:

What Makes a Good Cookbook

A good cookbook doesn't just help users solve today's problem, it also helps them understand the underlying principles behind the solutions, encouraging them to recognize when and how to adapt approaches. Users will be able to make more informed decisions about AI system design, develop judgement about model outputs, and build skills that transfer to future AI systems.

What Cookbooks Are NOT

Cookbooks are not pure tutorials: We assume users have basic technical skills and API familiarity. We clearly state prerequisites in our cookbooks, and direct users to the Academy to learn more on topics.

They are not comprehensive explanations: We don't teach transformer architecture or probability theory. We need to understand that our users are following our cookbooks to solve problems they are facing today. They are busy, in the midst of learning or building, and want to be able to use what they learn to solve their immediate needs.

Cookbooks are not reference docs: We don't exhaustively document every parameter, we link to appropriate resources in our documentation as needed.

Cookbooks are not simple tips and tricks: We don't teach "hacks" that only work for the current model generation. We don't over-promise and under-deliver.

Cookbooks are not production-ready code: They showcase use cases and capabilities, not production patterns. Excessive error handling is not required.

Style Guidelines

Voice & Tone
Writing Quality
Code Presentation
Output Handling

Remove extraneous output with %%capture:

Show relevant output:

Structural Requirements

See style_guide.md for detailed templates and examples

1. Introduction (Required)

Must include:

❌ Avoid: Leading with machinery ("We will build a research agent...")

✅ Do: Lead with problem/value ("Your team spends hours triaging CI failures...")

2. Prerequisites & Setup (Required)

Must include:

3. Main Content (Required)

Organized by logical steps or phases, each with:

4. Conclusion (Recommended)

Must include:

❌ Avoid: Generic summaries ("We've demonstrated how the SDK enables...")

✅ Do: Actionable guidance ("Consider applying this to X... Next, try Y...")

Optional Sections

Common Anti-Patterns to Flag

Refer to style_guide.md for detailed good/bad examples. Watch for these issues:

Introduction Anti-Patterns

❌ Leading with machinery: "We will build a research agent using the Claude SDK..."

❌ Feature dumps: Listing SDK methods or tool capabilities

❌ Vague learning objectives: "Learn about agents" or "Understand the API"

✅ Problem-first framing with specific, actionable learning objectives

Setup Anti-Patterns

❌ Noisy pip install output without %%capture

❌ Multiple separate pip install commands

❌ Using os.environ["API_KEY"] = "your_key" instead of dotenv

❌ Hardcoding model names throughout instead of using a MODEL constant

✅ Clean setup with grouped installs, dotenv, and constants

Code Presentation Anti-Patterns

❌ Code blocks without explanatory text before them

❌ No explanation of what we learned after running code

❌ Comments that explain "what" the code does (code should be self-documenting)

❌ Over-explaining obvious code

✅ Context before code, insights after code, comments explain "why"

Conclusion Anti-Patterns

❌ Generic summaries: "We've demonstrated how the SDK enables..."

❌ Simply restating what the notebook did without guidance

❌ Not mapping back to the stated learning objectives

✅ Actionable guidance on applying lessons to user's specific context

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.