Skip to content

maintainability

Critique principles for maintainable, readable code

From plugin
octo
3.9k50 skills50 agents50 commands20 hooks
Install
$ npx -y skills add nyldn/claude-octopus --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Critique principles for maintainable, readable code

Agent definition

maintainability.md
name: maintainability-principles
domain: maintainability
description: Critique principles for maintainable, readable code

Maintainability Principles

Code MUST adhere to these maintainability requirements:

Code Structure

1. **Single Responsibility** - Functions and classes do ONE thing. Keep them focused and small.

2. **DRY (Don't Repeat Yourself)** - Extract common logic into reusable functions. Avoid copy-paste.

3. **Separation of Concerns** - Keep business logic, data access, and presentation separate.

Naming & Readability

4. **Clear Naming** - Variables, functions, and classes describe their purpose. Avoid abbreviations.

5. **No Magic Numbers** - Constants are named and explained. Avoid hardcoded values.

6. **Consistent Style** - Follow project conventions. Use consistent formatting and patterns.

Error Handling

7. **Explicit Error Handling** - All errors are caught and handled appropriately. No silent failures.

8. **Meaningful Error Messages** - Errors include context for debugging. Log relevant details.

9. **Graceful Degradation** - Handle edge cases. Provide fallbacks where appropriate.

Testing & Documentation

10. **Testability** - Code is unit-testable. Dependencies are injectable. Pure functions preferred.

11. **Self-Documenting Code** - Code is readable without comments. Complex logic has explanations.

12. **API Documentation** - Public APIs have clear documentation. Include examples.

Design

13. **Loose Coupling** - Minimize dependencies between modules. Use interfaces/abstractions.

14. **High Cohesion** - Related functionality is grouped together. Modules have clear boundaries.

15. **YAGNI** - Don't build for hypothetical future requirements. Solve current problems.

Checklist

When reviewing code, verify:

  • [ ] Functions are small and focused
  • [ ] No code duplication
  • [ ] Clear, descriptive naming
  • [ ] No magic numbers or strings
  • [ ] Consistent code style
  • [ ] Proper error handling
  • [ ] Code is testable
  • [ ] Complex logic is documented
  • [ ] Dependencies are minimized
  • [ ] No over-engineering
Read more
Ships withocto

Every AI model has blind spots. Claude Octopus supports ten external provider integrations — Codex, Gemini, Antigravity CLI, Copilot, Qwen, Ollama, Perplexity, OpenRouter, OpenCode, and Grok — alongside the built-in Claude Code host, with consensus gates that

Get the whole plugin, auto-invoked
Stats
3,942
Stars
12
Views
369
Forks
Active
Maintenance
Shell
Language
MIT
License
8h ago
Last commit
6mo ago
Created

Repo: nyldn/claude-octopus