open-swe: Command for GitHub Copilot

.github/prompts/fix_preview_typecheck.md

fix_preview_typecheck is a command for GitHub Copilot from langchain-ai/open-swe. It costs 0 tokens per session (199 once invoked), scanned A, original, MIT.

A task for repairing TypeScript errors in a combined preview deployment tree, where the main branch and labelled pull requests have been merged. It requires committing only the changes needed to make the reported dashboard typecheck pass.

In plain words
What is it for?
Use it to fix the supplied typecheck failure and commit the correction on the current branch.
Why use it?
It addresses broken imports or other merge-resolution mistakes without undoing the intended changes from a pull request. It also limits work in a checkout that contains a write credential.

Command for GitHub Copilot ✓ vendor

Written for GitHub Copilot: a Copilot chat mode or prompt.

This is langchain-ai/open-swe's own configuration. It tells GitHub Copilot how to work on open-swe itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything open-swe configures →

About the project

Open SWE is an open-source software factory that gives coding tasks to an asynchronous agent, which investigates repositories, changes code, validates the results, and delivers pull requests. Engineering teams use it to automate code changes, reviews, CI follow-up, and related repository work from dashboards and connected tools.

langchain-ai/open-swe · 11,133 stars · on GitHub · langchain.com

Reuse

Borrowing it

Nothing to install: this file belongs to langchain-ai/open-swe. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/langchain-ai/open-swe/main/.github/prompts/fix_preview_typecheck.md
Clone the repo
git clone --depth 1 https://github.com/langchain-ai/open-swe

Made for: GitHub Copilot.

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 fix_preview_typecheck

README.md
[![agentmods](https://agentmods.dev/badge/commands/langchain-ai/open-swe/fix_preview_typecheck/github.svg)](https://agentmods.dev/commands/langchain-ai/open-swe/fix_preview_typecheck)
Your own site
<a href="https://agentmods.dev/commands/langchain-ai/open-swe/fix_preview_typecheck"><img src="https://agentmods.dev/badge/commands/langchain-ai/open-swe/fix_preview_typecheck/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 fix_preview_typecheck

Your own site · 80×15
<a href="https://agentmods.dev/commands/langchain-ai/open-swe/fix_preview_typecheck"><img src="https://agentmods.dev/badge/commands/langchain-ai/open-swe/fix_preview_typecheck.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 199 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00199
Opus 5.5 $0.00000 $0.00080
Sonnet 5.5 $0.00000 $0.00040
Haiku 4.5 $0.00000 $0.00020

Measured yesterday against content hash 28e8376450d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fix_preview_typecheck 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 yesterday.

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.

.github/prompts/fix_preview_typecheck.md · 13 lines

What it actually says

This checkout is the preview deployment being assembled: main plus every labelled pull request, merged together. The combined tree fails the dashboard typecheck, and stdin holds the failing command and its output. Earlier conflict resolutions in this tree may be wrong, such as an import that points at a module that no longer exists.

Fix the errors so the result behaves the way every merged pull request intended, then commit the fix on HEAD. Change only what the errors require. Do not revert a pull request's change to make the errors go away. Whatever is committed on HEAD when you finish is what deploys.

Do not run the typecheck, package scripts, or anything else from this tree: this checkout holds a write credential, and the build typechecks your commit itself, in isolation, once you finish.

Finish with cli_result: exit_code 0 if you committed a fix, 1 otherwise, and a one-sentence stdout saying what you changed.

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. yesterday Changed · +5 lines 28e8376450d2
  2. 23d ago First seen · 8 lines · 0 tokens per session scan A 760a73f24e98

Subscribe to this mod's changes

fix_preview_typecheck is a command published in the GitHub repository langchain-ai/open-swe (11,133 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 199 tokens. 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-10-06.