agentleFS
theyoungastronautstheyoungastronauts/polaris/skills/cross-repo-context/SKILL.md

cross-repo-context

Skill4 starsChanged 3 months agoMITView on GitHub

Bridging decoupled backend and frontend repos: pulling backend context and generating or consuming integration summaries as API contracts. Apply when working across a backend/frontend boundary.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a request document:

    line 54
  2. Distinctive:

    Always generate/update the integration summary when backend API changes

    line 83
  3. Distinctive:

    If the summary and reality don't match, update the summary first

    line 85
  4. Distinctive:

    Keep summaries in version control so both repos can reference them

    line 86
  5. Distinctive:

    When in doubt, err on the side of over-documenting the API contract

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Cross-Repo Context

Purpose

Manage context sharing between decoupled backend and frontend repositories.

The Problem

Full-stack features span multiple repos. Claude Code works best within a single repo, but needs awareness of the other side's contracts, types, and behaviors.

The Integration Summary Protocol

Backend → Frontend (after backend work completes)

Generate docs/integration/[feature-name].md with:

# Integration Summary: [Feature Name]
Generated: [date]
Backend Branch: [branch name]

## Endpoints

### [METHOD] /api/v1/[path]
- Auth: [required/optional/none]
- Permissions: [list]

**Request:**
```json
{ "example": "request body" }

Response (200):

{ "example": "response body" }

Error Responses:

  • 400: { "detail": "..." }
  • 403: { "detail": "..." }

Models Changed

  • [Model]: [brief description of changes]

Notes

  • [Any special behavior, pagination details, WebSocket events, etc.]

### Frontend → Backend (when frontend needs backend changes)

Create a request document:
```markdown
# API Request: [Feature Name]

## What I Need
- Endpoint: [METHOD] /api/v1/[desired-path]
- Purpose: [what the frontend needs to do]

## Desired Response Shape
```json
{ "what_i_want": "..." }

Context

  • Which screen/component needs this
  • User flow description

## When to Pull Backend Context Directly

Sometimes the integration summary isn't enough. Use the `context-pull.sh` script (in the Polaris repo — e.g. `~/prj/polaris/context-pull.sh ../backend-api`) to extract relevant backend code when:
- Debugging a mismatch between expected and actual API behavior
- The integration summary is outdated or incomplete
- You need to understand validation rules or business logic
- Building complex forms that need to match backend validation exactly

The script extracts serializers, views, models, and URL configs into a single context document.

## Best Practices
- Always generate/update the integration summary when backend API changes
- Frontend should never assume — verify types against actual API responses
- If the summary and reality don't match, update the summary first
- Keep summaries in version control so both repos can reference them
- When in doubt, err on the side of over-documenting the API contract

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.