pragma
by Lava Raju
Enforce Pragmatic Programmer principles through structured design, systematic debugging, and automated debt audits.
Free
pragma
Example session with this skill installed
/pragma:review for the current changes in the auth module. Focus on decoupling and safety.
- Read your context and instructions
- Compiled the pragma
I have scanned the changes in the auth module using the pragmatic detector scripts and manual principle review.
Review Findings: Auth Module
| File:Line | Principle | Finding | Recommended Fix |
|---|---|---|---|
src/auth/service.js:42 | Stay Safe | User ID is interpolated directly into a logging string that might persist to external sinks. | Use a structured logger or sanitize the ID before interpolation. |
src/auth/provider.js:12 | Decoupling | The AWS Cognito SDK is imported and used directly in the business logic. | Wrap the Cognito call in an AuthProvider interface to allow easier provider swaps. |
src/auth/store.js:89 | DRY | The password validation regex is redefined here, duplicating logic in src/users/validator.js. | Move the regex to a shared ValidationConstants module. |
src/auth/login.js:25 | Temporal Coupling | Sequential awaits on session creation and analytics tracking. | Use Promise.all as these operations do not depend on each other. |
Next steps
- Extract the
AuthProviderinterface to isolate the AWS SDK dependency. - Centralize the validation logic to
src/common/validation.jsto satisfy DRY. - Run
/pragma:refactor src/auth/login.jsto fix the sequential await bottleneck.
Connects securely to your tools. The creator never sees your data.
About this skill
Maintaining code quality is easy at the start, but as complexity grows, the cost of change skyrockets. This skill enforces the 15 core principles of The Pragmatic Programmer to ensure your codebase remains decoupled, testable, and resilient to shifting requirements.
What it does
- Design Ladder Enforcement ensures every new feature is evaluated for changeability, single responsibility, and knowledge duplication before code is written.
- Deterministic Violation Detection scans diffs and repositories for hardcoded secrets, injection risks, and accidental temporal coupling.
- Systematic Debugging Protocol replaces guesswork with a falsifiable hypothesis framework, ensuring every fix is rooted in a verified cause and backed by a regression test.
- Contract Definition establishes strict preconditions, postconditions, and invariants for modules to prevent boundary errors.
- Refactoring Discipline manages micro-step transformations to improve internal structure without breaking existing functionality.
How it works
- Feature Planning uses
/pragma:design <feature>to map out units, boundaries, and interfaces before implementation begins. - Review Cycles use
/pragma:reviewto scan uncommitted changes against pragmatic checklists and detector scripts. - Repository Audits run
/pragma:auditto rank technical debt by safety risk and cost of change. - Configuration uses
/pragma:modeto set enforcement intensity from lite to strict.
Frameworks & tools
The skill uses a built-in scan.js detector and mode.js configuration script. It integrates with git for diff analysis and works across any language by focusing on architectural principles like DRY, orthogonality, and composition.
Why this beats prompting it yourself
Generic prompts often overlook the "cost of change" and temporal coupling. This skill uses structured protocols and scripts that verify assumptions instead of just generating plausible-looking code.
Use cases
- Auditing a legacy repository to identify high-risk technical debt.
- Designing a new service integration while maintaining strict decoupling.
- Debugging a production race condition using a formal investigation gate.
- Refactoring a complex module by enforcing composition over inheritance.
Known limitations
Requires a local environment capable of running Node.js for the detector scripts. It focuses on structural design and safety rather than language-specific syntax linting.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 11 days ago
- Free with an Agensi account
- Software
Git
Permissions
What's inside
Frequently Asked Questions
New in Code Quality & Review
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.