Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/dalehurley/codewithphp/code-testing-requirementsgit clone --depth 1 https://github.com/dalehurley/codewithphpWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01206 | $0.01206 |
| Opus 5 | $0.00603 | $0.00603 |
| Sonnet 5 | $0.00241 | $0.00241 |
| Haiku 4.5 | $0.00121 | $0.00121 |
Grade A, and why
code-testing-requirements scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
# Test in browser or with curl How it starts
The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Testing Requirements
Testing Directory Structure
All code snippets and samples from tutorials MUST be tested in the /testing directory before being considered complete.
- Testing Root:
/testing - PHP Basics Code:
/testing/php-basics/ - AI/ML Series Code:
/testing/ai-ml-series/ - Test Script: /testing/test-all-samples.php
- Test Report: /testing/TEST-SUMMARY-REPORT.md
Testing Requirements
For New Code Samples
When creating new code samples for tutorials:
-
Copy to Testing Directory
- Place files in appropriate
/testing/{series-name}/subdirectory - Maintain same directory structure as docs/series/
- Place files in appropriate
-
Run Test Script
cd /Users/dalehurley/Code/PHP-From-Scratch/testing php test-all-samples.php -
Verify Results
- ✅ Code must execute without errors (return code 0)
- OR document expected failures (web server context, dependencies, etc.)
- Update TEST-SUMMARY-REPORT.md if needed
Code Quality Standards
All tutorial code samples must:
- ✅ Be complete and runnable (no partial code)
- ✅ Use PHP 8.4 syntax and features
- ✅ Include proper error handling where appropriate
- ✅ Follow PSR-12 coding standards
- ✅ Have no type errors or undefined variables (unless intentional for teaching)
- ✅ Include comments explaining key concepts
- ✅ Cast types explicitly when needed (
(string),(int), etc.)
Expected Failure Categories
Some failures are acceptable if documented:
- Web Server Context - Files requiring
$_SERVERvariables, headers, or HTTP requests - Missing Dependencies - Files requiring Composer packages or external libraries
- Configuration Required - Files needing database connections, API keys, or setup
- Educational Errors - Intentional errors demonstrating common mistakes
- Integration Files - Files designed as part of larger applications (routers, controllers)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 167 lines · 1,206 tokens per session scan A f0b86e557907
code-testing-requirements is a cursor rule published in the GitHub repository dalehurley/codewithphp (5 stars, last pushed 6mo ago), licensed MIT. It adds 1,206 tokens to every session, about $0.0060 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
cursorrules
Cursor rule "cursorrules" from The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge, covering agentic coding: humans design, agents code!, agentic coding steps, example llm project file structure, pocket flow and core abstraction.
rapid-domain-mastery
Use the rapid-domain-mastery workflow for source-heavy learning, literature onboarding, qualifying exam prep, and deep diagnostic tutoring.
claude-code-skills
辅助用户掌握 Skills 能力的学习与开发指南.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.