Sponsor Suno AI Music arrow_forward
Subagent

General Principles

General code quality critique principles

Type
Subagent
GitHub stars
4.1k
License
MIT
Repo last updated
Sep 26, 2026

What General Principles is

General Principles is a subagent published in the nyldn/claude-octopus repository on GitHub, which has about 4.1k stars. The repository describes itself as: “Run multiple AI models against the same research, design, or coding task. Surface disagreements before you ship.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to General Principles and get back a compact result.

How to install General Principles

Claude Code

  1. Download general.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from agents/principles/general.md, shared under the repository's MIT license. Read the full file on GitHub.

Code MUST adhere to these quality requirements:

Correctness

  1. Functional Correctness - Code does what it's supposed to do. All requirements are met.
  1. Edge Case Handling - Boundary conditions are handled. Empty inputs, nulls, and limits work.
  1. Error Handling - Errors are caught and handled gracefully. No unhandled exceptions.

Reliability

  1. No Race Conditions - Concurrent access is properly synchronized.
  1. Resource Management - Resources are acquired late, released early. No leaks.
  1. Idempotency - Operations that should be idempotent are implemented correctly.

Code Quality

  1. Readability - Code is clear and understandable. Intent is obvious.
  1. Simplicity - Solutions are as simple as possible, but no simpler.
  1. Consistency - Code follows established patterns and conventions.

Best Practices

  1. Type Safety - Use types effectively. Avoid any/unknown where possible.
  1. Validation - Input is validated at boundaries. Output is sanitized.
  1. Logging - Important events are logged. Errors include context.

Architecture

  1. Modularity - Code is organized into logical modules. Clear boundaries.
  1. Dependencies - External dependencies are justified and minimal.
  1. Configuration - Environment-specific values are configurable.

Checklist

When reviewing code, verify:

  • Code is functionally correct
  • Edge cases are handled
  • Errors are handled appropriately
  • No obvious bugs or issues
  • Code is readable and maintainable
  • Follows project conventions
  • No unnecessary complexity
  • Proper use of types
  • Input validation in place
  • Appropriate logging

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is General Principles?

General Principles is a subagent for Claude Code and Claude Cowork from the nyldn/claude-octopus repository on GitHub. General code quality critique principles

How do I install General Principles in Claude Code?

Download general.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use General Principles in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is General Principles safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.