Skip to content

Add Context7 instructions for authoritative external documentation usage#727

Merged
aaronpowell merged 5 commits intogithub:stagedfrom
lance2k:feat-add-context7-instruction
Feb 23, 2026
Merged

Add Context7 instructions for authoritative external documentation usage#727
aaronpowell merged 5 commits intogithub:stagedfrom
lance2k:feat-add-context7-instruction

Conversation

@lance2k
Copy link
Copy Markdown
Contributor

@lance2k lance2k commented Feb 14, 2026

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, agent, or skill file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, or skill with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Description

Add a new repository-wide instruction document describing how and when to use Context7 for retrieving authoritative external documentation and examples. The instruction provides workflow steps and guidance for resolving library IDs and querying Context7 for version-sensitive API docs. This helps agents and contributors fetch up-to-date external docs when local context is insufficient.

File added: context7.instructions.md

Usage notes:

  • Use when library/framework API details or version-sensitive guidance is required.
  • Follow the resolve → query workflow described in the instruction.
  • The instruction recommends citation of sources when using external docs.

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New collection file.
  • New skill file.
  • Update to existing instruction, prompt, agent, collection or skill.
  • Other (please specify):

By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Copilot AI review requested due to automatic review settings February 14, 2026 22:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new repository-wide custom instruction that guides Copilot/agents to use Context7 for authoritative, version-specific external documentation when local repo context is insufficient.

Changes:

  • Added instructions/context7.instructions.md describing when/how to use Context7 and an MCP tool workflow.
  • Updated docs/README.instructions.md to include the new instruction in the instructions index.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
instructions/context7.instructions.md Introduces Context7 usage guidance and an MCP-based workflow for resolving libraries and fetching docs.
docs/README.instructions.md Adds an index entry so the new instruction is discoverable/installable.

Comment thread instructions/context7.instructions.md Outdated
Comment thread instructions/context7.instructions.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@lance2k
Copy link
Copy Markdown
Contributor Author

lance2k commented Feb 14, 2026

npm start generate the following title Context7-aware development which is a bit ambiguous and feels like an incomplete sentence. So I changed it to Context7 Instructions for clarity.

Copy link
Copy Markdown
Contributor

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this is a valuable addition. We already have a context7 agent in the repo and given that agents can define a MCP server as part of their frontmatter plus are able to be shipped in plugins, which instructions cannot, this has diminishing value to users.

@lance2k
Copy link
Copy Markdown
Contributor Author

lance2k commented Feb 16, 2026

I don't think that this is a valuable addition. We already have a context7 agent in the repo and given that agents can define a MCP server as part of their frontmatter plus are able to be shipped in plugins, which instructions cannot, this has diminishing value to users.

Thanks for the feedback. I see your point about the existing context7 agent already being in the repo and it's distinct advantage over instructions. But the context7 agent instructions only applies if we use the agent. For the default Plan and Agent this instructions does not apply. I use this instructions when working with the default agents, custom agents and it works well as intended ( copilot uses context7 without me typing use context7 in every prompt ). Also I made this as a copilot alternative to this cursor rule https://context7.com/docs/tips#add-a-rule

@aaronpowell
Copy link
Copy Markdown
Contributor

It might be worth considering removing the agent and instead replacing it with a skill crafted off this. Skills can be picked up by any agent (or manually invoked), and they are more distributable using plugins (which don't support instructions).

@aaronpowell
Copy link
Copy Markdown
Contributor

As noted in #751 we are changing the process for contributing and using a branch, staged, that is the target of PR's rather than main.

Can you retarget this branch to staged please. That can be done with the GitHub CLI:

gh pr edit 727 --base staged

@lance2k lance2k changed the base branch from main to staged February 19, 2026 16:53
@lance2k
Copy link
Copy Markdown
Contributor Author

lance2k commented Feb 19, 2026

It might be worth considering removing the agent and instead replacing it with a skill crafted off this. Skills can be picked up by any agent (or manually invoked), and they are more distributable using plugins (which don't support instructions).

I'm do not know how widely used the Context7 agent is, nor have I used it myself, so I can’t confidently weigh in on whether it should be removed. I could try creating a skill based on this, but I’ll need some time to experiment and test it, as I'm still fairly new to SKILL.md.

aaronpowell
aaronpowell previously approved these changes Feb 23, 2026
@lance2k lance2k dismissed aaronpowell’s stale review February 23, 2026 23:29

The merge-base changed after approval.

@aaronpowell aaronpowell merged commit 05116b2 into github:staged Feb 23, 2026
3 checks passed
@lance2k
Copy link
Copy Markdown
Contributor Author

lance2k commented Feb 24, 2026

@all-contributors add @username for Instructions

@allcontributors
Copy link
Copy Markdown
Contributor

@lance2k

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@lance2k
Copy link
Copy Markdown
Contributor Author

lance2k commented Feb 24, 2026

@all-contributors add @lance2k for Instructions

@allcontributors
Copy link
Copy Markdown
Contributor

@lance2k

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@lance2k
Copy link
Copy Markdown
Contributor Author

lance2k commented Mar 6, 2026

@all-contributors please add @lance2k for code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants