RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/TechNickAI/ai-coding-config

Cursor rule

.cursor/rules/external-apis.mdc

When calling external APIs

Cursor rules

Quality

54/100

Scores the file, not the repository.

Length

217 words

7 headings · 2 code blocks

Repository

24

— · pushed 41 days ago

Last changed

3 days ago

First indexed 3 days ago.
TechNickAI/ai-coding-config/.cursor/rules/external-apis.mdcRawGitHub
1---
2description: When calling external APIs
3alwaysApply: false
4version: 1.0.0
5---
6 
7# External API Client Guidelines
8 
9These guidelines ensure consistent, reliable, and maintainable API clients.
10 
11## Core Principles
12 
13- We return None on API errors (don't raise exceptions)
14- We use type hints consistently
15- We document methods with helpful docstrings (skip redundant Args/Returns)
16- We use appropriate logging levels
17- We let exceptions bubble up unless we're truly handling them
18 
19## Method Pattern
20 
21```python
22def get_something(self, param: str) -> dict | None:
23 """Fetch something from the API.
24 
25 Returns None if the API returns no data or encounters an error.
26 """
27 logger.info(f"Fetching something for {param}")
28 
29 response = self.request("/endpoint", params={"key": param})
30 if not response:
31 logger.warning(f"No data returned for {param}")
32 return None
33 
34 return response["data"]
35```
36 
37## Error Handling
38 
39We let the base HTTP client handle HTTP/network errors. We only use try/except for
40specific scenarios with actual handling. We validate response structure before access.
41 
42## Validation Pattern
43 
44```python
45response = self.request("/endpoint", params={"key": value})
46if not response or "data" not in response:
47 logger.warning(f"No data returned for {value}")
48 return None
49```
50 
51## Response Processing
52 
53We validate response structure before access, convert to standard types (Decimal for
54financial data), clean and normalize data, and return None for errors (not empty dicts).
55 
56## Testing
57 
58We mock all external calls in unit tests, use @pytest.mark.flaky for live API tests, and
59test both success and error cases.
60 

Sections

  • External API Client Guidelines
  • Core Principles
  • Method Pattern
  • Error Handling
  • Validation Pattern
  • Response Processing
  • Testing

What it covers

testtesting-strategyapi

Stack — with the evidence

python

(0.80)

github-actions

(0.60)

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
TechNickAI
Language
—
License
—
Archived
no

All configs in this repo

Also in TechNickAI/ai-coding-config

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
TechNickAI/ai-coding-config.cursor/rules/git-commit-message.mdc · 24Cursor rulespythongithub-actionsarchgitdeployment58/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/git-interaction.mdc · 24Cursor rulespythongithub-actionstestlint-formatstylearch+488/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/heart-centered-ai-philosophy.mdc · 24Cursor rulespythongithub-actionsno sections30/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/ruff-linting.mdc · 24Cursor rulespythongithub-actionslint-format43/1003 days ago
TechNickAI/ai-coding-configAGENTS.md · 24AGENTS.mdpythongithub-actionsstylearchgitdo-not+178/1003 days ago
TechNickAI/ai-coding-config.claude-plugin/CLAUDE.md · 24CLAUDE.mdpythongithub-actionsdeployment25/1003 days ago
TechNickAI/ai-coding-config.claude/AGENTS.md · 24AGENTS.mdpythongithub-actionsarchagent-behaviour54/1003 days ago
TechNickAI/ai-coding-config.claude/CLAUDE.md · 24CLAUDE.mdpythongithub-actionslint-formatstyletypestesting-strategy+162/1003 days ago
TechNickAI/ai-coding-config.cursor/AGENTS.md · 24AGENTS.mdpythongithub-actionsarchdo-notagent-behaviour56/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/autonomous-development-workflow.mdc · 24Cursor rulespythongithub-actionstestlint-formatgitagent-behaviour77/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/code-review-standards.mdc · 24Cursor rulespythongithub-actionstesttypestesting-strategygit+259/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/code-style-and-zen-of-python.mdc · 24Cursor rulespythongithub-actionslint-formatstyledocs62/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/fixing-github-actions-builds.mdc · 24Cursor rulespythongithub-actionssetupbuilddo-notagent-behaviour81/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/git-worktree-task.mdc · 24Cursor rulespythongithub-actions+1lint-formatgitagent-behaviour38/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/naming-stuff.mdc · 24Cursor rulespythongithub-actionsstyle48/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/prompt-engineering.mdc · 24Cursor rulespythongithub-actionssetuptestlint-formatstyle+657/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/trust-and-decision-making.mdc · 24Cursor rulespythongithub-actionsno sections48/1003 days ago
TechNickAI/ai-coding-config.cursor/rules/user-facing-language.mdc · 24Cursor rulespythongithub-actionslint-formatstylearch66/1003 days ago
TechNickAI/ai-coding-configplugins/core/agents/CLAUDE.md · 24CLAUDE.mdpythongithub-actionstestlint-formatarchgit+166/1003 days ago
TechNickAI/ai-coding-configplugins/core/skills/CLAUDE.md · 24CLAUDE.mdpythongithub-actionslint-formatagent-behaviour58/1003 days ago
Diff against .cursor/rules/git-commit-message.mdc Diff against .cursor/rules/git-interaction.mdc Diff against .cursor/rules/heart-centered-ai-philosophy.mdc Diff against .cursor/rules/ruff-linting.mdc Diff against AGENTS.md Diff against .claude-plugin/CLAUDE.md Diff against .claude/AGENTS.md Diff against .claude/CLAUDE.md Diff against .cursor/AGENTS.md Diff against .cursor/rules/autonomous-development-workflow.mdc Diff against .cursor/rules/code-review-standards.mdc Diff against .cursor/rules/code-style-and-zen-of-python.mdc Diff against .cursor/rules/fixing-github-actions-builds.mdc Diff against .cursor/rules/git-worktree-task.mdc Diff against .cursor/rules/naming-stuff.mdc Diff against .cursor/rules/prompt-engineering.mdc Diff against .cursor/rules/trust-and-decision-making.mdc Diff against .cursor/rules/user-facing-language.mdc Diff against plugins/core/agents/CLAUDE.md Diff against plugins/core/skills/CLAUDE.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
skillrecordings/egghead-next.cursor/rules/project-update-user-rules.mdc · 1.4kCursor rulestypescriptnode+14buildtestlint-formatstyle+796/1003 days ago
skillrecordings/egghead-next.cursor/rules/project-update-rules.mdc · 1.4kCursor rulestypescriptnode+14buildtestlint-formatstyle+796/1003 days ago
nerds-odd-e/doughnut.cursor/rules/cli.mdc · 49Cursor rulestypescriptcypress+14setupbuildteststyle+496/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126Cursor rulesgobiome+4buildlint-formatstylearch+396/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack