Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    henriquefy

    1

    Apply Henrique Bastos's Python design principles, OO patterns, and testing practices with verified citations.

    Free

    Security scanned
    henriquefy

    henriquefy

    Example session with this skill installed

    henriquefy this view function to better align with HB principles, especially regarding decoupling the business logic from the web framework.

    • Read your context and instructions
    • Compiled the henriquefy

    I have reviewed the view function in web/views.py. The implementation currently couples HTTP request handling with domain persistence logic. Following the transformation playbook, I will refactor this into a dedicated service strategy while maintaining the public contract.

    Refactored Implementation

    
    # web/views.py
    from django.http import JsonResponse
    from .domain import process_registration
    
    def register_user(request):
        """
        Refactored to decouple framework from domain.
        Principle: Separation of Concerns (Principle ID: HB-004)
        Reasoning: The view should only handle the HTTP protocol boundary.
        """
        if request.method != 'POST':
            return JsonResponse({'error': 'Method not allowed'}, status=405)
        
        # The business logic is now encapsulated and testable in isolation
        try:
            result = process_registration(request.POST.dict())
            return JsonResponse(result, status=201)
        except ValueError as e:
            return JsonResponse({'error': str(e)}, status=400)
    

    Changes applied:
    1.

    Extracted Domain Logic: Moved user validation and saving to process_registration. (HB-004, Course: Welcome to the Django, Lesson 12).
    2.

    Simplified View Responsibility: The view now only validates the method and serializes the response. (Pattern: Service Layer, Repo: zen-of-python/checkout, commit 8a2f3c).

    Next steps

    • Run scripts/henriquefy.sh check web/views.py to verify no new responsibility leaks were introduced.
    • Update the unit tests in tests/test_views.py to mock the process_registration call.
    • Review the "Nota do Henrique" by running the grade command to see if the Decoupling dimension improved.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Python code often suffers from early generalization, leaky abstractions, and brittle test suites. This skill applies the specific software design philosophy of Henrique Bastos (HB Network) to your codebase, enforcing rigorous object-oriented principles and API design patterns derived from his courses and repositories.

    What it does

    • Code Review identifies responsibility leaks, premature generalizations, and domain modeling conflicts using a distilled knowledge base.
    • Automated Grading generates a two-tier report: a deterministic mechanical score and a nuanced judgment grade across seven architectural dimensions.
    • Guided Transformation rewrites code snippets one principle at a time, ensuring test parity between every incremental change.
    • Knowledge Retrieval answers architectural questions by citing specific lessons, timestamps, and repository commits from the HB Network ecosystem.
    • Pattern Matching compares your implementation against verified patterns, course reconstructions, or framework-specific translations.

    How it works

    1. Use the check command to run a mechanical analysis of your path followed by a manual judgment pass for deep architectural flaws.
    2. Invoke grade to receive a "Nota do Henrique," a weighted rubric scoring your code from A to E based on Bastos's specific criteria.
    3. Use ask to query the internal knowledge base for citations on specific principles like "Simple is better than complex."
    4. Trigger transform to refactor a snippet following a strict playbook that prioritizes public contract stability and incremental testing.

    Frameworks & tools

    Primarily designed for Python environments using uv, pytest, and standard OO patterns. It integrates with a custom CLI utility for deterministic scoring and uses a structured Markdown knowledge base for principle enforcement.

    Why this beats prompting it yourself

    Generic AI advice often suggests industry "best practices" that contradict specific high-cohesion philosophies. This skill restricts the agent to a closed-loop knowledge base of Bastos's teachings, preventing hallucinations and ensuring every suggestion is backed by a verified lesson citation.

    Use cases

    • Auditing a Django or Flask service for "fat models" and leaky business logic.
    • Grading student or junior developer submissions against a specific pedagogical rubric.
    • Refactoring legacy scripts into maintainable, test-driven object-oriented structures.
    • Onboarding developers to the HB Network coding style through interactive Q&A.

    Known limitations

    Does not support non-Python languages. Requires a local environment setup with the henriquefy.sh script for full grading capabilities. Findings are restricted to the provided knowledge base.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 9 days ago

    • Free to download with an account

    Requires

    uv (Python tool runner)
    henriquefy
    Python
    contacts

    Listed9 days ago

    What's inside

    Frequently Asked Questions