The /kun skill downloads its instructions from GitHub on every run

The /kun skill downloads a Node script from GitHub main on each invocation, caches root docs locally, then reads ENTRY.md to answer.

The /kun agent skill does not bundle its operating instructions in the skill package. On each invocation, it tells the coding agent to fetch pull-kun.mjs from GitHub's main branch and run it with Node, without an LLM. The script fills a local cache, and the agent then reads ENTRY.md plus the other root documents.

Key facts

  • On 2026-09-06, Kun Chen created the kunchenguid/kun repository with initial commit 3b3b460 and announced /kun on X as a personal distillation refreshed daily by automated pipelines.
  • The entrypoint skills/kun/SKILL.md instructs agents to download https://raw.githubusercontent.com/kunchenguid/kun/main/scripts/pull-kun.mjs (falling back to jsDelivr) and run node /path/to/pull-kun.mjs --dir <cache> on every /kun run.
  • The script defaults its local cache to $KUN_PULL_DIR or ~/.cache/kun and downloads remote files over HTTPS.
  • While individual items in content/ are checked against SHA-256 hashes in content/MANIFEST.json, the root instructions (ENTRY.md, TOOLS.md, OPINIONS.md, and VOICE.md) are fetched from main without checking any remote manifest hash or signature.
  • The synchronization script pull-kun.mjs is fetched and run as Node.js code; its source does not pin a Git commit, verify a signature, or drop privileges.
  • On 2026-10-05, automated commits continued updating the repository on main (commit 109875c), and Kun Chen pointed to kunchenguid/kun as a pinned project on his GitHub profile.
  • As read on 2026-10-06, the repository has 396 stars, 37 forks, zero GitHub releases, and no software license file.

How the /kun skill bootstrap works

The /kun package is a two-stage dynamic loader. Its entrypoint pulls pull-kun.mjs, then the agent reads the resulting local cache.

The skill entrypoint in skills/kun/SKILL.md defines a minimal prompt that delegates execution to the shell:

~~~markdown

1. Pull (no LLM)

Download the public pull script, then run it with Node. Prefer raw GitHub; use

jsDelivr only as fallback:

# cache defaults to $KUN_PULL_DIR or ~/.cache/kun
node /path/to/pull-kun.mjs --dir <cache>

If the pull fails, stop and say so. Do not guess.

~~~

When an agent executes this command, pull-kun.mjs resolves the cache directory (defaulting to ~/.cache/kun), downloads remote files, and writes them to disk. After the script terminates with exit code 0, the skill prompt directs the agent to read four root markdown files from the cache: ENTRY.md, TOOLS.md, OPINIONS.md, and VOICE.md.

Once loaded, ENTRY.md routes user requests into distinct engineering workflows. Task execution branches into research, planning using lavish-axi, bug reproduction, refactoring guardrails, and validation using no-mistakes or adversarial subagent reviews.

How pull-kun.mjs verifies content and root documents

The synchronization script pull-kun.mjs divides repository assets into two categories with different verification behaviors: content archives and root instructions.

First, the script fetches content/MANIFEST.json, which indexes historical posts, YouTube transcripts, and articles. For each entry in content/, the script verifies the downloaded bytes against the sha256 digest recorded in the manifest:

const hash = sha256(buf);
if (entry.sha256 && hash !== entry.sha256) {
  console.error(`pull-kun: hash mismatch for ${rel}: got ${hash}, expected ${entry.sha256}`);
  process.exit(1);
}

However, both content/MANIFEST.json and the content files are retrieved from the mutable main branch over public HTTPS endpoints.

Second, the script synchronizes the four root guidance files that dictate agent behavior: ENTRY.md, VOICE.md, OPINIONS.md, and TOOLS.md. These files are not listed in content/MANIFEST.json. The script fetches them directly from raw.githubusercontent.com/kunchenguid/kun/main/:

// Root docs
const docHashes = await loadDocHashes(cacheDir);
for (const doc of ROOT_DOCS) {
  let buf;
  try {
    buf = await fetchBytes(doc);
  } catch (err) {
    console.error(`pull-kun: failed to fetch ${doc}: ${err.message || err}`);
    process.exit(1);
  }
  const hash = sha256(buf);
  const dest = join(cacheDir, doc);
  if (docHashes[doc] === hash && existsSync(dest)) {
    continue;
  }
  await writeFile(dest, buf);
  docHashes[doc] = hash;
}
await saveDocHashes(cacheDir, docHashes);

The SHA-256 calculation on root documents is used solely for local cache management. The script writes the hash to .pull-meta.json in the local cache to skip re-writing identical files on subsequent runs. There is no ahead-of-time cryptographic signature, signed Git commit verification, or pinned hash checking against root documents before they are saved and fed into the agent.

Security implications and operational tradeoffs of the /kun architecture

In an article published on 2026-09-09 titled "I distilled myself, and you should too", Kun Chen explained the architectural motivation: automating daily updates from his public posts, videos, and GitHub activity so agents do not require constant human course correction. The repository README notes that the project deliberately does not accept pull request contributions because it serves as an individual engineer's knowledge ledger.

This dynamic pull pattern introduces specific operational and security characteristics:

  1. Remote code execution from a mutable branch: The agent downloads pull-kun.mjs directly from the main branch and executes it with Node.js on the local workstation. The source contains no commit pin, signature check, or sandbox step, so changed bytes would change the code that runs.
  2. Instruction mutability: Because ENTRY.md and related root guidance files are pulled directly from main without cryptographic verification or pinning, the instructions steering agent code generation and terminal command execution can change between consecutive agent invocations without user approval or package version increments.
  3. Absence of version releases: With zero GitHub releases and no software license file in the repository as of 2026-10-06, installations pinning to a stable version tag cannot rely on official release assets.
  4. Network fragility: If GitHub and jsDelivr cannot be reached, or if an environment blocks outbound HTTPS requests, the pull script exits with an error and the skill says to stop.

Sources

Last verified: 2026-10-06.

Spotted an outdated or wrong claim? Agents can report it with evidence throughPOST /api/feedback; an editor checks every report. See llms.txt for the agent API.