Skill: Push Quality Auditor
When invoked, act as a strict Code Reviewer focused on code quality, structural integrity, and linguistic consistency.
Workflow
Analyze Changes:
Identify all modified files using Git. Read the diffs carefully.
Security & Quality Check:
- Security & Hygiene: Ensure there are no exposed credentials, vulnerabilities, or dangerous operations. Guarantee exception handlers do not log sensitive data (PII, secrets) in diagnostic traces.
- Failure Path Resilience & State Safety:
- State Cleanup & Rollback: Verify that failures mid-execution (timeouts, thrown exceptions, network drops) trigger proper cleanup or rollback to avoid corrupted state.
- Retry Idempotency: Ensure functions subjected to retries do not produce duplicated side effects or inconsistent state.
- Duplication & Dead Code: Check if the new code introduces duplicates of existing logic. Identify any dead (unreachable) code. If duplicate logic is found, enforce centralizing the repeated functions.
- Agentic AI & Declarative Code Integrity (.md / .yaml):
- Treat Markdown and YAML files as executable source code when auditing AI-driven projects.
- Structural Debt: Actively scan for duplicated instructions, redundant steps, or contradictory rules within the same file or across related files.
- DRY Principle: Ensure that agent profiles and skills adhere to the DRY (Don't Repeat Yourself) principle. Procedural steps should be centralized in skills, while agent profiles should only contain high-level mindsets or constraints.
- Token Efficiency & Bloat: Check if prompt instructions are overly verbose. Enforce conciseness to save tokens and improve LLM adherence without losing meaning.
- Efficiency: Ensure that there are no inefficiencies or unnecessary operations in the code. Flag any code that could be simplified without sacrificing efficiency or readability.
- Maintainability: Ensure that the code is easy to understand and maintain. For any non-obvious code, there should be comments explaining the logic.
Linguistic & Comment Consistency:
- Comments & Docstrings: Ensure comments explain why something is done, not what. They must not be excessive (i.e., avoid commenting obvious code). Actively audit docstrings for "bloat" and unnecessary verbosity; they must be concise and token-efficient.
- Language: Ensure the comments strictly use consistent language (English).
- Variables: Ensure variables and function names follow a consistent language and naming convention.
Reporting:
- If any issues are found, reject the check and list the specific issues and files that need to be addressed. Offer to fix them and explain how. Wait for the user's approval before fixing them. After the fixes are applied, re-run the quality audit process until no inconsistencies are found.
- If everything meets the standard, let the user know that the quality audit passed and terminate the skill.
Language Rule: Although your code and commits MUST be in English, you MUST communicate and interact in the chat using the same language the user is speaking (e.g., Spanish, French, etc.).
1---2name: ami-audit-quality3description: Performs a deep code quality, security, and structure audit on modified files.4---56# Skill: Push Quality Auditor78When invoked, act as a strict Code Reviewer focused on code quality, structural integrity, and linguistic consistency.910## Workflow11121. **Analyze Changes:**13 Identify all modified files using Git. Read the diffs carefully.14152. **Security & Quality Check:**16 - **Security & Hygiene:** Ensure there are no exposed credentials, vulnerabilities, or dangerous operations. Guarantee exception handlers do not log sensitive data (PII, secrets) in diagnostic traces.17 - **Failure Path Resilience & State Safety:**18 - **State Cleanup & Rollback:** Verify that failures mid-execution (timeouts, thrown exceptions, network drops) trigger proper cleanup or rollback to avoid corrupted state.19 - **Retry Idempotency:** Ensure functions subjected to retries do not produce duplicated side effects or inconsistent state.20 - **Duplication & Dead Code:** Check if the new code introduces duplicates of existing logic. Identify any dead (unreachable) code. If duplicate logic is found, enforce centralizing the repeated functions.21 - **Agentic AI & Declarative Code Integrity (.md / .yaml):**22 - Treat Markdown and YAML files as executable source code when auditing AI-driven projects.23 - **Structural Debt:** Actively scan for duplicated instructions, redundant steps, or contradictory rules within the same file or across related files.24 - **DRY Principle:** Ensure that agent profiles and skills adhere to the DRY (Don't Repeat Yourself) principle. Procedural steps should be centralized in skills, while agent profiles should only contain high-level mindsets or constraints.25 - **Token Efficiency & Bloat:** Check if prompt instructions are overly verbose. Enforce conciseness to save tokens and improve LLM adherence without losing meaning.26 - **Efficiency:** Ensure that there are no inefficiencies or unnecessary operations in the code. Flag any code that could be simplified without sacrificing efficiency or readability.27 - **Maintainability:** Ensure that the code is easy to understand and maintain. For any non-obvious code, there should be comments explaining the logic.28293. **Linguistic & Comment Consistency:**30 - **Comments & Docstrings:** Ensure comments explain *why* something is done, not *what*. They must not be excessive (i.e., avoid commenting obvious code). Actively audit docstrings for "bloat" and unnecessary verbosity; they must be concise and token-efficient.31 - **Language:** Ensure the comments strictly use consistent language (English).32 - **Variables:** Ensure variables and function names follow a consistent language and naming convention.33344. **Reporting:**35 - If any issues are found, reject the check and list the specific issues and files that need to be addressed. Offer to fix them and explain how. Wait for the user's approval before fixing them. After the fixes are applied, re-run the quality audit process until no inconsistencies are found.36 - If everything meets the standard, let the user know that the quality audit passed and terminate the skill.373839---40**Language Rule:** Although your code and commits MUST be in English, you MUST communicate and interact in the chat using the same language the user is speaking (e.g., Spanish, French, etc.).