Polyglot developer
Skill rafaelghif/antigravity-agents/.agents/skills/polyglot-developer
Universal software engineering enforcer for any programming language (Python, PHP, TS, Java, Go, etc.).From its SKILL.md
npx -y skills add rafaelghif/antigravity-agents --skill polyglot-developerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.2 KB, 448 tokens by cl100k_base, as published. Nobody here has run it
Polyglot Developer Skill
Objective
To ensure that all code generated by the agent adheres to universal Software Engineering principles (Clean Code, SOLID, DRY) while respecting the specific idioms, conventions, and style guides of the target programming language.
When to Execute
- Automatically triggered during Step 5 (Implementation) of the
TASK_TEMPLATE.md. - Whenever writing new code, refactoring, or architecting a new module.
Execution Steps
-
Language & Environment Detection:
- Before writing code, inspect the repository to detect the primary languages (e.g.,
package.jsonfor JS/TS,composer.jsonfor PHP,requirements.txtfor Python,.csprojfor C#). - Identify the project's linter or formatter configuration (
.eslintrc,phpcs.xml,flake8,checkstyle.xml) if any.
- Before writing code, inspect the repository to detect the primary languages (e.g.,
-
Universal Clean Code Principles (Language-Agnostic):
- SOLID Principles: Ensure Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.
- Meaningful Naming: Use descriptive, pronounceable names for variables, functions, and classes. Avoid abbreviations.
- Small Functions: Keep functions small and focused on a single task.
-
Idiomatic Adaptation (Language-Specific):
- Python: Adhere to PEP-8, use list comprehensions, and leverage type hints.
- PHP: Adhere to PSR-12, strict types (
declare(strict_types=1);), and modern PHP 8+ features. - JavaScript/TypeScript: Use ES6+ syntax, strict null checks, and avoid mutating state where functional approaches fit better.
- Java/C#: Use proper access modifiers, leverage OOP patterns, and handle exceptions correctly.
- Go: Keep it simple, handle
errexplicitly, usegofmt.
-
Self-Correction Check:
- Before finalizing the code, mentally review if it violates any language-specific conventions or creates technical debt.