API integration with context-matic
Integrate external APIs by detecting the project language, ensuring context-matic guidelines and skills exist, discovering the supported API catalog, asking focused implementation questions, looking up SDK models and endpoints, and recording only real integration milestones.
When to invoke
- "Integrate this third-party API."
- "Add an SDK client for PayPal."
- "Implement a feature with Twilio."
- "Use an external API in this project."
- "Look up endpoint details for this API SDK."
Prerequisites and context
- Use the context-matic MCP server. Do not rely only on model memory for API availability or SDK details.
- If the requested API is not returned by
fetch_api, stop and report that the API is not currently available in context-matic instead of guessing SDK usage.
- Check context-matic-generated guidelines and skills independently; one present file does not prove the rest exist.
Language detection
Inspect the workspace and choose the primary language before any context-matic call that requires language.
| File or pattern |
Language |
*.csproj, *.sln |
csharp |
package.json with "typescript" dependency or .ts files |
typescript |
requirements.txt, pyproject.toml, *.py |
python |
go.mod, *.go |
go |
pom.xml, build.gradle, *.java |
java |
Gemfile, *.rb |
ruby |
composer.json, *.php |
php |
Context-matic workflow
- Detect the language from repository files.
- Check for existing generated materials:
{language}-conventions skill from add_skills.
{language}-security-guidelines.md and {language}-test-guidelines.md from add_guidelines.
update-activity-workflow.md from add_guidelines.
- If required guideline files are missing, call
add_guidelines.
- If
{language}-conventions is missing, call add_skills.
- Call
fetch_api with language and the API key from the user's request, such as "paypal" or "twilio".
- If there is no exact match and a catalog is returned, identify the correct API by name and description, then extract its
key.
- Ask focused implementation questions with
ask, providing language, key, and query.
- Look up SDK definitions with
model_search and endpoint details with endpoint_search as needed.
- Implement code following the returned guidance and project conventions.
- Call
update_activity only after a milestone is concretely reached in code or infrastructure.
- Compile or test the project after each code modification.
Tool usage rules
| Tool |
Required parameters |
Use it when |
Do not use it for |
add_guidelines |
Project context from repository |
Missing {language}-security-guidelines.md, {language}-test-guidelines.md, or update-activity-workflow.md. |
Refreshing files that already exist unless the user asks. |
add_skills |
Detected language |
Missing {language}-conventions. |
Recreating an existing conventions skill. |
fetch_api |
language, key |
First API discovery call for every integration. |
Recording progress; it is discovery, not integration. |
ask |
language, key, query |
Authentication, create payment, rate limits, error handling, webhook setup, or focused code guidance. |
Broad multi-part questions that should be split. |
model_search |
language, key, case-sensitive query such as availableBalance or TransactionId |
Model or object definitions. |
Calling the external API. |
endpoint_search |
language, key, case-sensitive query such as createUser or get_account_balance |
Endpoint method details. |
Calling the external API. |
update_activity |
Appropriate milestone |
Concrete progress reached in code or infrastructure. |
Questions, searches, planning, or fetch_api results. |
Milestones
| Milestone |
Pass it only when |
sdk_setup |
SDK package is installed and the package command succeeded, such as npm install, pip install, or go get. |
auth_configured |
API credentials are explicitly present in runtime configuration such as .env, a secrets manager, or config file, and actual code references them. |
first_call_made |
First API call code was written and executed. |
error_encountered |
The developer reports a bug, error response, or failing call. |
error_resolved |
A fix was applied and the API call is confirmed working. |
Gotchas
fetch_api is not progress: do not call update_activity just because an API was discovered.
- Keys are exact after discovery: use the returned context-matic
key for all later calls, not a display name you inferred.
- Model and endpoint searches are definitions only: they do not perform network calls against the third-party API.
- Absent APIs are hard stops: if the API is missing, ask the user how to proceed rather than inventing integration code.
Use the API name/key distinction carefully: the display name may differ from the returned key. Guidelines are language-specific, model_search returns a model/object definition, and update_activity is valid only after concrete code/infrastructure progress.
Output template
## Context-matic API integration result
**Status:** integrated | guidance only | blocked
**Language:** `<language>`
**API key:** `<context-matic key or not found>`
| Step | Tool or check | Result |
| --- | --- | --- |
| Language detection | repository files | `<evidence>` |
| Guidelines/skills | `add_guidelines` / `add_skills` / skipped | `<result>` |
| API discovery | `fetch_api` | `<result>` |
| Guidance | `ask` | `<queries asked>` |
| SDK details | `model_search` / `endpoint_search` | `<models/endpoints>` |
| Milestone | `update_activity` | `<milestone or none>` |
| Validation | `<compile/test command>` | `<pass/fail/not run>` |
**Next action:** <specific implementation step or user decision needed>
Quality gate
1---2name: integrate-context-matic3description: Discover and integrate third-party APIs with the context-matic MCP server using fetch_api, ask, model_search, endpoint_search, add_guidelines, add_skills, and update_activity. Use this skill when the user asks to integrate a third-party API, add an API client or SDK, implement features with an external API, or work with PayPal, Twilio, or another third-party API.4---56<!-- Generated from harness/github-copilot/skills/integrate-context-matic/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# API integration with context-matic910Integrate external APIs by detecting the project language, ensuring context-matic guidelines and skills exist, discovering the supported API catalog, asking focused implementation questions, looking up SDK models and endpoints, and recording only real integration milestones.1112## When to invoke1314- "Integrate this third-party API."15- "Add an SDK client for PayPal."16- "Implement a feature with Twilio."17- "Use an external API in this project."18- "Look up endpoint details for this API SDK."1920## Prerequisites and context2122- Use the context-matic MCP server. Do not rely only on model memory for API availability or SDK details.23- If the requested API is not returned by `fetch_api`, stop and report that the API is not currently available in context-matic instead of guessing SDK usage.24- Check context-matic-generated guidelines and skills independently; one present file does not prove the rest exist.2526## Language detection2728Inspect the workspace and choose the primary language before any context-matic call that requires `language`.2930| File or pattern | Language |31| --- | --- |32| `*.csproj`, `*.sln` | `csharp` |33| `package.json` with `"typescript"` dependency or `.ts` files | `typescript` |34| `requirements.txt`, `pyproject.toml`, `*.py` | `python` |35| `go.mod`, `*.go` | `go` |36| `pom.xml`, `build.gradle`, `*.java` | `java` |37| `Gemfile`, `*.rb` | `ruby` |38| `composer.json`, `*.php` | `php` |3940## Context-matic workflow41421. Detect the language from repository files.432. Check for existing generated materials:44 - `{language}-conventions` skill from `add_skills`.45 - `{language}-security-guidelines.md` and `{language}-test-guidelines.md` from `add_guidelines`.46 - `update-activity-workflow.md` from `add_guidelines`.473. If required guideline files are missing, call `add_guidelines`.484. If `{language}-conventions` is missing, call `add_skills`.495. Call `fetch_api` with `language` and the API `key` from the user's request, such as `"paypal"` or `"twilio"`.506. If there is no exact match and a catalog is returned, identify the correct API by name and description, then extract its `key`.517. Ask focused implementation questions with `ask`, providing `language`, `key`, and `query`.528. Look up SDK definitions with `model_search` and endpoint details with `endpoint_search` as needed.539. Implement code following the returned guidance and project conventions.5410. Call `update_activity` only after a milestone is concretely reached in code or infrastructure.5511. Compile or test the project after each code modification.5657## Tool usage rules5859| Tool | Required parameters | Use it when | Do not use it for |60| --- | --- | --- | --- |61| `add_guidelines` | Project context from repository | Missing `{language}-security-guidelines.md`, `{language}-test-guidelines.md`, or `update-activity-workflow.md`. | Refreshing files that already exist unless the user asks. |62| `add_skills` | Detected `language` | Missing `{language}-conventions`. | Recreating an existing conventions skill. |63| `fetch_api` | `language`, `key` | First API discovery call for every integration. | Recording progress; it is discovery, not integration. |64| `ask` | `language`, `key`, `query` | Authentication, create payment, rate limits, error handling, webhook setup, or focused code guidance. | Broad multi-part questions that should be split. |65| `model_search` | `language`, `key`, case-sensitive `query` such as `availableBalance` or `TransactionId` | Model or object definitions. | Calling the external API. |66| `endpoint_search` | `language`, `key`, case-sensitive `query` such as `createUser` or `get_account_balance` | Endpoint method details. | Calling the external API. |67| `update_activity` | Appropriate `milestone` | Concrete progress reached in code or infrastructure. | Questions, searches, planning, or `fetch_api` results. |6869## Milestones7071| Milestone | Pass it only when |72| --- | --- |73| `sdk_setup` | SDK package is installed and the package command succeeded, such as `npm install`, `pip install`, or `go get`. |74| `auth_configured` | API credentials are explicitly present in runtime configuration such as `.env`, a secrets manager, or config file, and actual code references them. |75| `first_call_made` | First API call code was written and executed. |76| `error_encountered` | The developer reports a bug, error response, or failing call. |77| `error_resolved` | A fix was applied and the API call is confirmed working. |7879## Gotchas8081- **`fetch_api` is not progress**: do not call `update_activity` just because an API was discovered.82- **Keys are exact after discovery**: use the returned context-matic `key` for all later calls, not a display name you inferred.83- **Model and endpoint searches are definitions only**: they do not perform network calls against the third-party API.84- **Absent APIs are hard stops**: if the API is missing, ask the user how to proceed rather than inventing integration code.8586Use the API name/key distinction carefully: the display name may differ from the returned `key`. Guidelines are language-specific, model_search returns a model/object definition, and update_activity is valid only after concrete code/infrastructure progress.8788## Output template8990```markdown91## Context-matic API integration result9293**Status:** integrated | guidance only | blocked94**Language:** `<language>`95**API key:** `<context-matic key or not found>`9697| Step | Tool or check | Result |98| --- | --- | --- |99| Language detection | repository files | `<evidence>` |100| Guidelines/skills | `add_guidelines` / `add_skills` / skipped | `<result>` |101| API discovery | `fetch_api` | `<result>` |102| Guidance | `ask` | `<queries asked>` |103| SDK details | `model_search` / `endpoint_search` | `<models/endpoints>` |104| Milestone | `update_activity` | `<milestone or none>` |105| Validation | `<compile/test command>` | `<pass/fail/not run>` |106107**Next action:** <specific implementation step or user decision needed>108```109110## Quality gate111112- [ ] The primary language was detected from repository files before context-matic calls.113- [ ] Missing guideline files and `{language}-conventions` were checked independently.114- [ ] `fetch_api` was called first with the detected `language` and requested API `key`.115- [ ] The returned API `key` was used for `ask`, `model_search`, and `endpoint_search`.116- [ ] Missing APIs were reported as unavailable in context-matic without guessing SDK usage.117- [ ] `update_activity` was called only for concrete milestones: `sdk_setup`, `auth_configured`, `first_call_made`, `error_encountered`, or `error_resolved`.118- [ ] The project compiled or tested after code changes, or the blocker is stated.