23 Commits

Author SHA1 Message Date
Alex Notov
09e59d768d Fix: Revert accidental case-sensitive changes
Reverted unintended case changes that occurred during the global rename:
- GitHub Actions: Changed ANTHROPIC_API_KEY back to anthropic_api_key in workflow files
- Python function: Changed ANTHROPIC_API_KEY parameter back to anthropic_api_key in ContextualVectorDB class

These changes maintain consistency with Python naming conventions (snake_case) and
the original GitHub Actions workflow configuration.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 17:11:14 -06:00
Alex Notov
27e3c055fc Fix CI: Revert CLAUDE_API_KEY to ANTHROPIC_API_KEY in GitHub Actions
The GitHub Actions workflows were updated to use CLAUDE_API_KEY but the repository
secrets still use ANTHROPIC_API_KEY. Reverting to maintain compatibility with
existing infrastructure while keeping all other Claude branding changes.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 16:59:11 -06:00
Alex Notov
bfffab4523 chore: Updates all references per new branding. 2025-09-16 16:35:49 -06:00
Jiri De Jonghe
f26aa5891c Add Claude Code SDK tutorials and examples (#195)
* Add Claude Code SDK tutorials and examples

This PR adds comprehensive tutorials and examples for the Claude Code SDK, including:
- Research agent implementation with web search capabilities
- Chief of Staff agent with multi-agent coordination
- Observability agent with Docker configuration
- Supporting utilities and documentation

The examples demonstrate key SDK features:
- Multi-turn conversations with ClaudeSDKClient
- Custom output styles and slash commands
- Hooks for automated actions and governance
- Script execution via Bash tool
- Multi-agent orchestration patterns

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: rodrigo olivares <rodrigoolivares@anthropic.com>
Co-authored-by: Alex Notov <zh@anthropic.com>
2025-09-12 15:04:34 -07:00
Alex Notov
cfb97d9066 fix: remove SAST workflow due to inaccessible action 2025-09-11 14:52:03 -06:00
Alex Notov
5e02d662d1 fix(ci): expand CI coverage to all notebook directories
Previously, CI workflows only monitored notebooks in the skills/ directory.
This caused PR #193 to merge without pedagogical review since its notebook
was in tool_evaluation/.

Changes:
- Update all notebook-related CI workflows to monitor **/*.ipynb
- Add SAST security monitoring workflow for code security analysis
- Update validate_notebooks.py to check all repository notebooks
- Fix notebook discovery in links.yml workflow

This ensures comprehensive CI coverage for all 9+ directories containing
notebooks (skills/, tool_evaluation/, misc/, tool_use/, third_party/, etc.)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 14:46:30 -06:00
Alex Notov
46c5717029 fix(ci): simplify to v1 with built-in slash command support
Based on maintainer feedback:
- Move commands directly to .claude/commands/ (no symlinks needed)
- Use v1 with minimal configuration (auto mode detection)
- Remove unnecessary parameters (mode, use_sticky_comment, etc.)
- v1 automatically finds commands in .claude/commands/
2025-09-08 08:35:10 -06:00
Alex Notov
6cc0be8971 fix(ci): set mode to agent for automatic execution
The beta version defaults to 'tag' mode which requires manual triggering.
Set mode to 'agent' to run automatically on PR events.
2025-09-08 08:21:36 -06:00
Alex Notov
d68ef5ae51 fix(ci): use beta version for slash commands support
Switch from @v1 to @beta to enable experimental_slash_commands_dir
parameter which is required for slash commands to work properly
2025-09-08 08:17:42 -06:00
Alex Notov
bbf6a17a85 feat(ci): convert Claude prompts to reusable slash commands
- Create .github/slash-commands/ with link-review, model-check, notebook-review
- Update GitHub Actions to use slash commands instead of inline prompts
- Add symlinks in .claude/commands/ for local development
- Document slash commands in CONTRIBUTING.md
- Use claude-code-action@v1 instead of beta

This allows developers to run the same CI validations locally using
Claude Code slash commands before pushing changes.
2025-09-08 08:03:45 -06:00
Alex Notov
7938498146 refactor: simplify model validation to use Claude AI
Major simplification of CI/CD:
- Remove complex Python model validation scripts (400+ lines)
- Let Claude handle model validation intelligently via GitHub Actions
- Claude fetches latest models from docs.anthropic.com/en/docs/about-claude/models/overview.md
- Add comprehensive notebook validation script for local testing
  - Interactive dashboard with progress tracking
  - Auto-fix for deprecated models
  - GitHub issue export format
  - Idempotent with state persistence
- Simplify CI to use single Python version (3.11)
- Update workflows to use Claude for all intelligent validation

Benefits:
- No more hardcoded model lists to maintain
- Claude understands context (e.g., educational examples)
- 50% faster CI (removed matrix strategy)
- Single source of truth for models (docs site)
2025-09-07 17:27:34 -06:00
Alex Notov
0cbf8bdee0 perf: remove unnecessary Python matrix strategy
- Use Python 3.11 only (no version-specific code in notebooks)
- Reduces CI runtime by 50%
- Reduces API costs by 50% for notebook execution
- Simplifies PR checks (one instead of two identical)
2025-09-07 16:57:14 -06:00
Alex Notov
97647e97e2 refactor: let Claude handle security checks intelligently
- Remove brittle hardcoded API key checks from validate_notebooks.py
- Enhance Claude review to check for any secrets (not just Anthropic)
- Claude understands context (e.g., educational 'bad examples' are OK)
2025-09-07 16:50:53 -06:00
Alex Notov
027216e0d6 feat: enhance notebook review to validate cookbook usability
- Check for clear introduction explaining the notebook's purpose
- Validate configuration instructions are present
- Ensure connecting explanations between cells for better flow
2025-09-07 16:47:05 -06:00
Alex Notov
3ab4f7d735 feat: add Claude-powered PR review workflows
- Add claude-notebook-review.yml for intelligent code review
- Add claude-link-review.yml for link quality checks
- Update notebook-quality.yml to properly capture test outputs
- Use anthropics/claude-code-action@beta like docs repo
2025-09-07 16:36:41 -06:00
Alex Notov
13111dc0d3 fix: correct nbformat validator command in CI
The correct command is 'python -m nbformat.validator' not
'python -m nbformat.validator.validate'
2025-09-07 16:09:47 -06:00
Alex Notov
d7db210bd4 fix: remove nbstripout and preserve notebook outputs
Notebook outputs are educational content in cookbook repositories.
They show users what to expect when running the code.

- Remove nbstripout from all dependencies and configurations
- Remove nbstripout check from CI workflow
- Update documentation to explain outputs are intentional
- Make validation scripts non-blocking for POC
- Fix lychee configuration conflict

The CI now validates notebooks without removing demonstration outputs.
2025-09-07 16:07:13 -06:00
Alex Notov
dad3a564bd Revert "fix: remove redundant security scan and strip notebook outputs"
This reverts commit fc1c9d183e.
2025-09-07 16:04:45 -06:00
Alex Notov
dd1ce0a3f2 fix: make CI non-blocking for POC demonstration
- Make ruff checks non-blocking (|| true) for notebooks
- Make model validation report issues but not fail
- This allows the POC to demonstrate issue detection without blocking

The CI now shows what issues exist without preventing the PR from
being merged, which is appropriate for a proof of concept.
2025-09-07 15:58:44 -06:00
Alex Notov
fc1c9d183e fix: remove redundant security scan and strip notebook outputs
- Remove security-scan.yml since GitHub secret scanning is already enabled
- Strip outputs from all notebooks to pass nbstripout validation
- GitHub's built-in secret scanning provides:
  - Automatic detection of exposed secrets
  - Push protection to block commits with secrets
  - Validity checks for detected secrets
2025-09-07 15:55:18 -06:00
Alex Notov
4c1f9af8c6 refactor: simplify notebook CI/CD by removing nbqa and papermill
Remove nbqa in favor of ruff's native Jupyter support (v0.6.0+).
Replace papermill with nbconvert due to uv dependency resolution issues.
Also remove S105/S106 ignores to enforce better security practices.

- Update pyproject.toml to use ruff v0.12.12 with native notebook support
- Replace papermill with nbconvert for notebook execution
- Remove nbqa from all dependencies and pre-commit hooks
- Update GitHub Actions workflows to use ruff directly
- Remove hardcoded password ignores for better security
- Update documentation to reflect simplified setup
- Add dummy package structure for hatchling build system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 15:37:36 -06:00
Alex Notov
e0d22d077e ci(links): add link checking with lychee
- Configure lychee for notebook link validation
- Set up GitHub workflow for PR and scheduled checks
- Exclude API endpoints and localhost from checks
- Add PR comment integration for broken links
2025-09-05 19:00:20 -06:00
Alex Notov
60d3273707 ci(github): add notebook validation workflows
- Add notebook-quality.yml with papermill execution testing
- Add claude-model-check.yml for model validation
- Add security-scan.yml for secret detection
- Implement tiered testing (full for maintainers, mock for external)
2025-09-05 18:58:22 -06:00