pragma

    by Lava Raju

    1

    Enforce Pragmatic Programmer principles through structured design, systematic debugging, and automated debt audits.

    Free

    Security scanned

    Works with the AI Agents you already use

    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:LinePrincipleFindingRecommended Fix
    src/auth/service.js:42Stay SafeUser 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:12DecouplingThe 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:89DRYThe 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:25Temporal CouplingSequential awaits on session creation and analytics tracking.Use Promise.all as these operations do not depend on each other.

    Next steps

    1. Extract the AuthProvider interface to isolate the AWS SDK dependency.
    2. Centralize the validation logic to src/common/validation.js to satisfy DRY.
    3. Run /pragma:refactor src/auth/login.js to 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

    1. Feature Planning uses /pragma:design <feature> to map out units, boundaries, and interfaces before implementation begins.
    2. Review Cycles use /pragma:review to scan uncommitted changes against pragmatic checklists and detector scripts.
    3. Repository Audits run /pragma:audit to rank technical debt by safety risk and cost of change.
    4. Configuration uses /pragma:mode to 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed11 days ago

    What's inside

    Frequently Asked Questions

    While generic prompts provide style tips, 'pragma' uses built-in detector scripts like scan.js to programmatically identify technical debt, temporal coupling, and architectural violations that LLMs often miss during standard chat sessions.

    The skill is language-agnostic because it focuses on architectural principles like DRY and orthogonality; however, your local environment must be able to run Node.js to execute the included detector and configuration scripts.

    You receive the core logic for the 15 Pragmatic principles, the scan.js detector for repository audits, the mode.js configuration utility, and a set of structured commands for design, review, and debugging.

    The skill functions as a logic layer for any AI agent with filesystem access and terminal execution capabilities, allowing it to bridge the gap between high-level architectural advice and actual file analysis via git.

    Simply import the skill into your agent's library and use the `/pragma:mode` command to calibrate the enforcement intensity to your project's specific safety requirements and tolerance for technical debt.

    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.

    Free