- Home
- Skills
- Code Quality & Review
- henriquefy
Works with the AI Agents you already use
henriquefy
Apply Henrique Bastos's Python design principles, OO patterns, and testing practices with verified citations.
Free
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.pyto verify no new responsibility leaks were introduced. - Update the unit tests in
tests/test_views.pyto mock theprocess_registrationcall. - Review the "Nota do Henrique" by running the
gradecommand 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
- Use the
checkcommand to run a mechanical analysis of your path followed by a manual judgment pass for deep architectural flaws. - Invoke
gradeto receive a "Nota do Henrique," a weighted rubric scoring your code from A to E based on Bastos's specific criteria. - Use
askto query the internal knowledge base for citations on specific principles like "Simple is better than complex." - Trigger
transformto 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.
Requires Python environment for CLI tools. Only supports Python code analysis. Knowledge base is limited to the provided reference files and cannot invent opinions outside of them.
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 any payment.
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
1 use
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 1 month ago
- Free with an Agensi account
Requires
Permissions
Allowed Hosts