get-qodo-rules
Loads org- and repo-level coding rules from Qodo before code tasks begin, ensuring all generation and modification follows team standards. Use before any code generation or modification task when rules are not already loaded. Invoke when user asks to write, edit, refactor, or review code, or when starting implementation planning.
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 5
- Forks
- 2
01 前言 Front Matter
- name
- get-qodo-rules
- version
- 2.0.0
- triggers
- [ "get.?qodo.?rules", "get.?rules", "load.?qodo.?rules", "load.?rules", "fetch.?qodo.?rules", "fetch.?rules", "qodo.?rules", "coding.?rules", "code.?rules", "before.?cod", "start.?coding", "write.?code", "implement", "create.*code", "build.*feature", "add.*feature", "fix.*bug", "refactor", "modify.*code", "update.*code" ]
- description
- Loads org- and repo-level coding rules from Qodo before code tasks begin, ensuring all generation and modification follows team standards. Use before any code generation or modification task when rules are not already loaded. Invoke when user asks to write, edit, refactor, or review code, or when starting implementation planning.
- allowed-tools
- [ "Bash" ]
02 资源文件 24
- 参考文档references/ai_agg.md3.5 KB
- 参考文档references/ai_causal_effect.md11.2 KB
- 参考文档references/ai_classify.md3.7 KB
- 参考文档references/ai_detect_anomalies.md4.5 KB
- 参考文档references/ai_evaluate.md2.2 KB
- 参考文档references/ai_forecast.md6.5 KB
- 参考文档references/ai_generate_embedding.md1.6 KB
- 参考文档references/ai_generate_table.md2.9 KB
- 参考文档references/ai_generate.md3.9 KB
- 参考文档references/ai_if.md2.0 KB
- 参考文档references/ai_key_drivers.md7.1 KB
- 参考文档references/ai_score.md1.9 KB
- 参考文档references/ai_search.md3.7 KB
- 参考文档references/ai_similarity.md2.7 KB
- 参考文档references/ml_contribution_analysis.md4.8 KB
- 参考文档references/ml_correlation.md8.9 KB
- 参考文档references/ml_detect_change_points.md5.5 KB
- 参考文档references/ml_seasonality.md6.6 KB
- 参考文档references/ml_trend.md4.1 KB
- 参考文档references/output-format.md842 B
- 参考文档references/pagination.md1.3 KB
- 参考文档references/remote_models.md872 B
- 参考文档references/repository-scope.md964 B
- 参考文档references/vector_search.md4.0 KB
03 SKILL.md 正文
Get Qodo Rules Skill
Description
Fetches repository-specific coding rules from the Qodo platform API before code generation or modification tasks. Rules include security requirements, coding standards, quality guidelines, and team conventions that must be applied during code generation. Use before any code generation or modification task when rules are not already loaded. Invoke when user asks to write, edit, refactor, or review code, or when starting implementation planning. Skip if "Qodo Rules Loaded" already appears in conversation context
Workflow
Step 1: Check if Rules Already Loaded
If rules are already loaded (look for "Qodo Rules Loaded" in recent messages), skip to step 6.
Step 2: Verify working in a git repository
- Check that the current directory is inside a git repository. If not, inform the user that a git repository is required and exit gracefully.
- Extract the repository scope from the git
originremote URL. If no remote is found, exit silently. If the URL cannot be parsed, inform the user and exit gracefully. - Detect module-level scope: if inside a
modules/*subdirectory, use it as the query scope; otherwise use repository-wide scope.
See repository scope detection for details.
Step 3: Verify Qodo Configuration
Check that the required Qodo configuration is present. The default location is ~/.qodo/config.json.
- API key: Read from
~/.qodo/config.json(API_KEYfield). If not found, inform the user that an API key is required and provide setup instructions, then exit gracefully. - Environment name: Read from
~/.qodo/config.json(ENVIRONMENT_NAMEfield), withQODO_ENVIRONMENT_NAMEenvironment variable taking precedence. If not found, inform the user that an API key is required and provide setup instructions, then exit gracefully.
Step 4: Fetch Rules with Pagination
- Fetch all pages from the API (50 rules per page) until no more results are returned.
- On each page, handle HTTP errors and exit gracefully with a user-friendly message.
- Accumulate all rules across pages into a single list.
- Stop after 100 pages maximum (safety limit).
- If no rules are found after all pages, inform the user and exit gracefully.
See pagination details for the full algorithm and error handling.
Step 5: Format and Output Rules
- Print the "? Qodo Rules Loaded" header with repository scope, scope context, and total rule count.
- Group rules by severity and print each non-empty group: ERROR, WARNING, RECOMMENDATION.
- Each rule is formatted as:
- **{name}** ({category}): {description} - End output with
---.
See output format details for the exact format.
Step 6: Apply Rules by Severity
| Severity | Enforcement | When Skipped |
|---|---|---|
| ERROR | Must comply, non-negotiable. Add comment documenting compliance (e.g., # Following Qodo rule: No Hardcoded Credentials) |
Explain to user and ask for guidance |
| WARNING | Should comply by default | Briefly explain why in response |
| RECOMMENDATION | Consider when appropriate | No action needed |
Step 7: Report
After code generation, inform the user about rule application:
- ERROR rules applied: List which rules were followed
- WARNING rules skipped: Explain why
- No rules applicable: Inform: "No Qodo rules were applicable to this code change"
- RECOMMENDATION rules: Mention only if they influenced a design decision
How Scope Levels Work
Determines scope from git remote and working directory (see Step 2):
Scope Hierarchy:
- Universal (
/) - applies everywhere - Org Level (
/org/) - applies to organization - Repo Level (
/org/repo/) - applies to repository - Path Level (
/org/repo/path/) - applies to specific paths
Configuration
See ~/.qodo/config.json for API key setup. Set QODO_ENVIRONMENT_NAME env var or ENVIRONMENT_NAME in config to select environment.
Common Mistakes
- Re-running when rules are loaded - Check for "Qodo Rules Loaded" in context first
- Missing compliance comments on ERROR rules - ERROR rules require a comment documenting compliance
- Forgetting to report when no rules apply - Always inform the user when no rules were applicable, so they know the rules system is active
- Not in git repo - Inform the user that a git repository is required and exit gracefully; do not attempt code generation
- No API key - Inform the user with setup instructions; set
QODO_API_KEYor create~/.qodo/config.json - No rules found - Inform the user; set up rules at app.qodo.ai
04 同仓库更多 Skills
whatsapp-formatting
Format messages for WhatsApp, including mentions that render as real WhatsApp tags. Use when responding in a WhatsApp conversation (platform_id / chatJid ends with @s.whatsapp.net or @g.us).
welcome
Introduce yourself to a newly connected channel. Triggered automatically when a channel is first wired. Send a friendly greeting and brief overview of what you can do.
vercel-cli
Deploy apps to Vercel. Use when asked to deploy, ship, or publish a web application, or manage Vercel projects, domains, and environment variables.
slack-formatting
Format messages for Slack using mrkdwn syntax. Use when responding to Slack channels (folder starts with "slack_" or JID contains slack identifiers).
self-customize
Customize your own agent — add capabilities, install packages, add MCP servers, edit code or CLAUDE.md. Use when the user asks you to add a feature, install a tool, or modify how you work. For non-trivial code changes, delegate to a builder agent via create_agent.
onecli-gateway
OneCLI Gateway: transparent HTTPS proxy that injects stored credentials into outbound calls. You MUST use this skill when the user asks you to read emails, check calendar, access GitHub repos, create issues, check Stripe payments, or interact with ANY external service or API. Do NOT use browser extensions or OAuth CLI tools. Make HTTP requests directly; the gateway injects credentials automatically.