github-content

github-content is a cursor rule for Cursor from basher83/lunar-claude. It costs 850 tokens per session, scanned A, original, MIT.

A rule for retrieving files, history, branches, tags, and code from GitHub repositories through GitHub's dedicated tools.

In plain words
What is it for?
Use it whenever an agent needs to read GitHub files, inspect commits, list branches or tags, or search repository code.
Why use it?
It keeps GitHub access structured and tied to repository versions, while avoiding less reliable methods such as scraping web pages.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it whenever an agent needs to read GitHub files, inspect commits, list branches or tags, or search repository code.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/basher83/lunar-claude/github-content
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/basher83/lunar-claude

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for github-content

README.md
[![agentmods](https://agentmods.dev/badge/rules/basher83/lunar-claude/github-content/github.svg)](https://agentmods.dev/rules/basher83/lunar-claude/github-content)
Your own site
<a href="https://agentmods.dev/rules/basher83/lunar-claude/github-content"><img src="https://agentmods.dev/badge/rules/basher83/lunar-claude/github-content/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for github-content

Your own site · 80×15
<a href="https://agentmods.dev/rules/basher83/lunar-claude/github-content"><img src="https://agentmods.dev/badge/rules/basher83/lunar-claude/github-content.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 850 This file is loaded in full into every session.
When invoked 850 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00850 $0.00850
Opus 5.5 $0.00340 $0.00340
Sonnet 5.5 $0.00170 $0.00170
Haiku 4.5 $0.00085 $0.00085

Measured 1mo ago against content hash 06579bca3065, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

github-content scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/github-content.mdc · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub Content Access Rules

Always Use GitHub MCP Tools for GitHub Content

When accessing content from GitHub repositories, ALWAYS use GitHub MCP tools instead of web scraping, Firecrawl, or other methods.

Why Use GitHub MCP Tools

  1. Purpose-built: Designed specifically for GitHub API access
  2. More reliable: Uses official GitHub API with proper authentication
  3. Better performance: Handles rate limits and caching automatically
  4. Structured data: Returns metadata (SHA, file size, URLs) along with content
  5. Version control: Can access specific commits, branches, or tags

Available GitHub MCP Tools

File and Directory Access

  • mcp_github_get_file_contents - Get file or directory contents
    • Use for: Reading files, listing directories, accessing specific commits/branches
    • Example: mcp_github_get_file_contents(owner="anthropics", repo="skills", path="mcp-builder/SKILL.md")

Repository Information

  • mcp_github_get_commit - Get commit details
  • mcp_github_list_commits - List commits in a branch
  • mcp_github_list_branches - List repository branches
  • mcp_github_list_tags - List repository tags

Code Search

  • mcp_github_search_code - Search code across repositories
  • mcp_github_search_repositories - Search for repositories

Pull Requests and Issues

  • mcp_github_get_pull_request - Get PR details
  • mcp_github_get_pull_request_files - Get files changed in PR
  • mcp_github_get_pull_request_diff - Get PR diff
  • mcp_github_list_issues - List repository issues
  • mcp_github_get_issue - Get issue details

When to Use GitHub MCP vs Other Tools

Use GitHub MCP For

  • Reading files from GitHub repositories
  • Listing directory contents
  • Accessing specific commits, branches, or tags
  • Searching code within GitHub
  • Getting PR/issue information
  • Any GitHub content access

Do NOT Use GitHub MCP For

  • Non-GitHub websites (use Firecrawl/web_search)
  • GitHub pages/docs sites (use Firecrawl if GitHub MCP doesn't work)
  • General web content

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 120 lines · 850 tokens per session scan A 06579bca3065

Subscribe to this mod's changes

github-content is a cursor rule published in the GitHub repository basher83/lunar-claude (23 stars, last pushed yesterday), licensed MIT. It adds 850 tokens to every session, about $0.0034 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.