
medium-skill
by feiskyer
medium-skillは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。
SKILL.md
name: medium-skill description: Medium-sized skill for comprehensive token testing allowed_tools:
- read_file
- write_file
Medium Skill: Practical API Integration Playbook
This skill represents a medium-sized document that an engineering team might maintain to describe best practices for integrating with external APIs. The content is intentionally richer and longer than the previous skills, providing enough material for tests that compare token usage between metadata-only prompts and fully expanded skill prompts.
Establishing Clear Contracts
Before writing the first line of integration code, clarify the API contract:
- Define which operations are required for the product's first release.
- Identify rate limits, quota policies, and billing implications.
- Capture authentication requirements in a short checklist.
- Decide which fields are mandatory and which are optional.
These details should live in version-controlled documentation so that they can evolve alongside the code. Engineers can reference this skill while writing tests or reviewing changes to the integration layer.
Authentication and Secrets
Most APIs require some form of credential such as an API key, OAuth token, or signed JWT. Good practices include:
- Store secrets in a secure vault rather than in source control.
- Provide a lightweight helper that loads credentials from a single place.
- Rotate credentials regularly and document the rotation procedure.
- Log authentication failures with enough context to debug, but never log secrets.
When tests in this repository count tokens, they treat this section as part of the "full content" that is only loaded when the agent explicitly requests the medium‑sized skill.
Error Handling and Retries
API integrations fail in many subtle ways: network timeouts, malformed responses, authentication drift, and upstream outages. The integration layer should:
- Distinguish between transient and permanent failures.
- Use exponential backoff with jitter for retries.
- Prefer idempotent operations when possible.
- Surface clear error messages to both logs and users.
The goal is to avoid tight retry loops that amplify outages while still providing a smooth experience when brief network issues occur. Unit tests often simulate these failures by stubbing HTTP clients and asserting that the integration layer behaves as described here.
Pagination and Partial Results
Many APIs paginate large collections. Instead of loading every record at once, integrations should stream or page through results:
- Respect server-provided cursors or continuation tokens.
- Choose sensible default page sizes for the client.
- Allow callers to stop early when they have enough data.
- Validate that pagination state is not lost across retries.
By structuring the integration code around clear data flows and reusable helpers, teams can keep this logic understandable even when working with complex external APIs.
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です

