Agent skill

Night Market Collective Memory

by athola in athola/claude-night-market

Search and record project memory (Discussions, journal, ADRs).

MITAuto-check passedDevelopment

Install Night Market Collective Memory

skills CLI
$ npx skills add athola/claude-night-market --skill night-market-collective-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market night-market-collective-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/night-market-collective-memory .claude/skills/night-market-collective-memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
night-market-collective-memory
GitHub stars
341
Token cost
~3k tokens
SKILL.md length
1,122 words
Files
1
Skills in repo
152
Repo updated
First seen
Licence
MIT

At a glance

Search and record project memory (Discussions, journal, ADRs).

  • Works in 4 steps: plugins/abstract/hooks/skill_execution_lo… → plugins/abstract/scripts/aggregate_skill_… → plugins/abstract/hooks/post_learnings_sto… → …
  • Settled battles
  • SKILL.md covers Routing table: which memory…, Retrieval discipline: search…, Discussion taxonomy (verified… and Reading Discussions (tested…, plus 6 more sections
  • Calls gh, rg and python3

What it does

Night Market Collective Memory is an agent skill from athola/claude-night-market. Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Architecture decision records and Agent memory. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Settled battles
  • See failure-archaeology

Example prompts

  • “/night-market-collective-memory”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. plugins/abstract/hooks/skill_execution_logger.py
  2. plugins/abstract/scripts/aggregate_skill_logs.py writes
  3. plugins/abstract/hooks/post_learnings_stop.py (Stop hook,
  4. Promotion: 3 or more fire-emoji reactions on a Learnings

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • rg
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Night Market Collective Memory loads about 3k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 1,122 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 1,122 words, ~3,029 tokens.

Download SKILL.mdSave it as .claude/skills/night-market-collective-memory/SKILL.md (or your agent's skills folder).
name
night-market-collective-memory
description
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.

Night Market Collective Memory

This repo treats GitHub Discussions as agent collective memory (ADR-0007, docs/adr/0007-github-discussions-integration.md, accepted 2026-02-19). Sessions are amnesiac by default. The memory system fixes that with four layers: Discussions (cross-session, searchable), the decision journal (append-only tradeoff and lesson logs), numbered ADRs (architecture decisions), and dated research syntheses in docs/research/. One caveat on the fourth layer: docs/research/ is gitignored and machine-local, so it exists only on the authoring machine and is empty on fresh clones. A synthesis counts as collective memory only after promotion to a Discussion, ADR, or rule. This skill tells you where each kind of knowledge lives, how to read it, and how to write to it.

One hard fact first: there is NO gh discussion subcommand. Discussions are GraphQL-only. Minister playbooks once referenced a CLI that does not exist, and ADR-0007 replaced every reference with gh api graphql calls. Never guess a gh discussion command.

Routing table: which memory layer

You haveRecord or read it via
Settled battle, revert, dead endnight-market-failure-archaeology skill (read only, do not relitigate)
Tradeoff (chose A, sacrificed B)Decision journal docs/tradeoffs.md, TR-NNN entry
Lesson, failed approach, reworkDecision journal docs/lessons-learned.md, LL-NNN entry
Architecture decisionNumbered ADR in docs/adr/ (0001-0017 exist today)
Session insight, skill stats[Learning] Discussion (auto-posted daily, see below)
Strategy debate, big design[War Room] Discussion (Decisions category)
Durable synthesis, audit result[Knowledge] Discussion (Knowledge category)
PR review finding worth keeping[PR Finding] Discussion (Learnings category)
Multi-source research outputDated file in docs/research/ (LOCAL ONLY: gitignored, absent on fresh clones). Promote durable syntheses to a [Knowledge] Discussion, ADR, or rule to make them collective memory

Retrieval discipline: search before re-investigating

Before investigating any question about this repo's history, design, or past failures, run these searches first. Re-deriving a settled answer wastes a session and risks contradicting an accepted decision.

bash
# 1. Search Discussions by keyword (tested 2026-07-02)
gh api graphql -f query='
query($q: String!) {
  search(query: $q, type: DISCUSSION, first: 10) {
    nodes { ... on Discussion { number title url category { name } } }
  }
}' -f q='repo:athola/claude-night-market YOUR SEARCH TERMS'

# 2. Search local docs of record. Note: docs/research/ is gitignored
#    and machine-local, so it is empty on fresh clones and this
#    search only helps on the authoring machine.
rg -il "your terms" docs/research/ docs/adr/ CHANGELOG.md

# 3. Check the decision journal (if the files exist yet, see below)
rg -in "your terms" docs/tradeoffs.md docs/lessons-learned.md

Also check the night-market-failure-archaeology sibling for settled battles. A leyline SessionStart hook (plugins/leyline/hooks/fetch-recent-discussions.sh) already injects the 5 most recent Decisions discussions at session start, bounded to under 600 tokens with a 3-second timeout.

Discussion taxonomy (verified live 2026-07-02)

Repo categories include the four ADR-0007 ones (Decisions, Deliberations, Learnings, Knowledge) plus GitHub defaults. Title prefixes are the working taxonomy:

PrefixCategoryWhat it isVerified examples
[Learning]LearningsDaily digest, auto-posted#601, #602 (2026-07-01/02)
[Knowledge]KnowledgeDurable syntheses#448, #449 (April 2026 skill audit synthesis and Wave-3 backlog)
[War Room]DecisionsStrategy deliberations#222 (collective memory design), #271 (wiring publishing into workflows)
[PR Finding]LearningsReview findings worth keeping#424, #595
The [Learning] pipeline

Daily digests are auto-posted by abstract's Stop hook, part of the improvement feedback loop (Issue #69). The chain:

  1. plugins/abstract/hooks/skill_execution_logger.py (PreToolUse/PostToolUse) logs skill executions.
  2. plugins/abstract/scripts/aggregate_skill_logs.py writes ~/.claude/skills/LEARNINGS.md with skill-performance stats (skills analyzed, high-impact issues, slow and low-rated skills).
  3. plugins/abstract/hooks/post_learnings_stop.py (Stop hook, registered in plugins/abstract/hooks/hooks.json) posts a [Learning] YYYY-MM-DD digest, deduplicated by title. Opt-out: ~/.claude/skills/discussions/config.json.
  4. Promotion: 3 or more fire-emoji reactions on a Learnings discussion promote it to a GitHub Issue via plugins/abstract/scripts/promote_discussion_to_issue.py (default threshold 3, configurable via promotion_threshold).

Reading Discussions (tested queries)

List recent discussions, newest first (tested 2026-07-02, returned #602 and siblings):

bash
gh api graphql -f query='
query($owner: String!, $name: String!) {
  repository(owner: $owner, name: $name) {
    discussions(first: 10,
                orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes { number title category { name } createdAt url }
    }
  }
}' -f owner=athola -f name=claude-night-market

Fetch one discussion by number. The number is a GraphQL Int, so pass it with -F (typed), not -f (string). Passing -f fails with a type error:

bash
gh api graphql -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    discussion(number: $number) {
      title body url category { name }
      comments(first: 10) { nodes { body } }
    }
  }
}' -f owner=athola -f name=claude-night-market -F number=222

Writing Discussions (mutations: shapes verified, NOT executed)

Publishing rules from ADR-0007: prompt the user [Y/n] before any create or comment (no auto-publish), cap bodies at 2000 words and link to local files for detail, and pass all values as -f/-F variables (never string-interpolate into the query).

Mutations need node IDs. Resolve them first (this read query was tested 2026-07-02):

bash
gh api graphql -f query='
query($owner: String!, $repo: String!) {
  repository(owner: $owner, name: $repo) {
    id
    hasDiscussionsEnabled
    discussionCategories(first: 25) { nodes { id name slug } }
  }
}' -f owner=athola -f repo=claude-night-market

Create a comment (mutation shape from the canonical leyline templates, untested here to avoid posting):

bash
gh api graphql -f query='
mutation($discussionId: ID!, $body: String!) {
  addDiscussionComment(input: {
    discussionId: $discussionId,
    body: $body
  }) {
    comment { id url }
  }
}' -f discussionId="$DISCUSSION_ID" -f body="$COMMENT_BODY"

Creating a discussion uses createDiscussion(input: {repositoryId, categoryId, title, body}) (same status: shape verified against the canonical templates, untested here). For threaded replies, mark-as- answer, and updates, use the canonical template file: plugins/leyline/skills/git-platform/modules/command-mapping.md, section "Discussion Operations". GitHub only: GitLab and Bitbucket have no Discussions equivalent, so skip with a warning there.

Show full SKILL.md (460 more words)Show less

Decision journal (leyline:decision-journal contract)

The contract lives in plugins/leyline/skills/decision-journal/SKILL.md. Two append-only logs, co-located with the code:

  • docs/tradeoffs.md: decisions and the alternatives sacrificed. Entry IDs TR-NNN, status proposed, then accepted, then superseded-by: TR-NNN or deprecated.
  • docs/lessons-learned.md: failed approaches and rework, framed blamelessly. Entry IDs LL-NNN, status open, then actioned, then closed.

Discipline: append-only, never edit or delete an accepted entry. A reversal adds a new entry, flips the old one's status, and links both ways. Every entry links to its PR, commit, or issue. Draft the entry, show it to the human, and append only on confirm.

Status as of 2026-07-02: neither docs/tradeoffs.md nor docs/lessons-learned.md exists in the repo yet. The contract is defined and the files are created on first use (scaffolding belongs to attune:project-init). The append helper:

bash
python3 plugins/leyline/scripts/journal_append.py tradeoffs \
  --project-root . --title "Compliance check" \
  --field context="verify" --dry-run

Big decisions do not go in the journal. They get a numbered ADR in docs/adr/, and a journal entry may reference the ADR number.

Monitoring: a starved digest is an alert

If the newest [Learning] discussion is more than about 2 days old, treat it as an incident signal. Precedent: the digest was once starved for two months because hooks read CLAUDE_TOOL_* env vars Claude Code never sets, and the missing digest was the only visible symptom (full record: night-market-failure-archaeology SB9; fix: stdin-first shared/hook_io.read_hook_payload, CHANGELOG 1.9.14).

Check the gap with the tested list query above. If starved, verify each chain segment in order: is ~/.claude/skills/LEARNINGS.md fresh, is the Stop hook registered in plugins/abstract/hooks/hooks.json, and does the logger receive a stdin payload. Then follow night-market-debugging-playbook for hook triage.

When NOT to use

  • Settled failures, reverts, and dead ends you are tempted to re-try: read night-market-failure-archaeology instead.
  • Classifying or gating a change you are about to make: use night-market-change-control.
  • Running the hunch-to-accepted-result pipeline that produces docs/research/ syntheses: use night-market-research-methodology. This skill only covers where the outputs are stored and retrieved.
  • House style for the documents themselves: use night-market-docs-and-writing.

Exit Criteria

  • Before any re-investigation, a Discussions search and a docs/research/ search ran, and hits (or "no hits") were stated.
  • Any Discussions access used gh api graphql. Zero gh discussion invocations appear in the transcript.
  • New knowledge was routed per the routing table (correct layer named before writing anything).
  • Any journal write produced a stable TR-NNN/LL-NNN entry with an index row, and no prior entry was edited or deleted.
  • Any Discussion create or comment was confirmed by the user first, and used -f/-F variables (no string interpolation).
  • The newest [Learning] digest date was checked, and any gap over 2 days was reported as a starvation alert.

Provenance and maintenance

Compiled 2026-07-02 against repo v1.9.15, branch discussions-fix-1.9.14. Read queries in this file were executed live against athola/claude-night-market on 2026-07-02. Mutation snippets were checked against the leyline templates but not executed.

Re-verification one-liners for facts that may drift:

bash
# Taxonomy and digest freshness (also the starvation check)
gh api graphql -f query='query($o:String!,$n:String!){repository(owner:$o,name:$n){discussions(first:5,orderBy:{field:CREATED_AT,direction:DESC}){nodes{number title createdAt}}}}' -f o=athola -f n=claude-night-market

# Decision journal files exist yet?
ls docs/tradeoffs.md docs/lessons-learned.md

# Promotion threshold still 3 fire reactions?
rg -n "promotion_threshold" plugins/abstract/scripts/promote_discussion_to_issue.py

# Stop hook still registered?
rg -n "post_learnings_stop" plugins/abstract/hooks/hooks.json

# Canonical GraphQL templates still present?
rg -n "Discussion Operations" plugins/leyline/skills/git-platform/modules/command-mapping.md

# ADR count and 0007 status
ls docs/adr/ && rg -n "^Accepted" docs/adr/0007-github-discussions-integration.md

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/night-market-collective-memory of athola/claude-night-market.

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Night Market Collective Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Night Market Collective Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Night Market Collective Memory this skillathola/claude-night-market341—~3kAutomated safety check: PassMIT
Rememberantonio-orionus/Arroxy397—~571Automated safety check: PassMIT
Capture Knowledgeadamayoung/TMDb178—~2.3kAutomated safety check: PassApache-2.0
AI Project Memorytudoumashu/ai-memory-skillpack456—~1.1kAutomated safety check: PassMIT
Ogham Researchogham-mcp/ogham-mcp115—~1.4kAutomated safety check: PassMIT
Authoring Claude Mdsammcj/agentic-coding162—~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Remember

    antonio-orionus/Arroxy

    Persists a durable Arroxy lesson — a gotcha, user preference, workflow rule, or design decision — to the right tracked file (project memory, AGENTS.md, CONTEXT.md, dev-docs, or an ADR) so any coding…

    397 GitHub stars~571 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Capture Knowledge

    adamayoung/TMDb

    Records non-obvious lessons from a finished task, such as gotchas, API quirks and design decisions, into a project's knowledge folder before a pull request opens.

    178 GitHub stars~2.3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • AI Project Memory

    tudoumashu/ai-memory-skillpack

    Maintain bounded, durable AI project memory in a repository's docs/ai/ pack.

    456 GitHub stars~1.1k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Ogham Research

    ogham-mcp/ogham-mcp

    Structured memory capture for Ogham shared memory. An agent skill from ogham-mcp/ogham-mcp.

    115 GitHub stars~1.4k tokensUpdated 11 days ago
    Agent WorkflowsAuto-check passed
  • Authoring Claude Md

    sammcj/agentic-coding

    Creating and maintaining CLAUDE.md project memory files and .claude/rules/ rule files that provide non-obvious codebase context.

    162 GitHub stars~2.6k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Commit Context Lookup

    rohitg00/agentmemory

    Traces a file, function or line back to the agent session behind its current commit, using git blame and a memory lookup, and reports only what the records show.

    29k GitHub stars~522 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from athola/claude-night-market

All 152 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    341 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    341 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    341 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    341 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    341 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    341 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Questions about Night Market Collective Memory

What does Night Market Collective Memory do?

Search and record project memory (Discussions, journal, ADRs). Night Market Collective Memory is an agent skill from athola/claude-night-market. Search and record project memory (Discussions, journal, ADRs).

When should I use Night Market Collective Memory?

Night Market Collective Memory fits situations like: settled battles; see failure-archaeology.

How do I install Night Market Collective Memory in Claude Code?

Run `npx skills add athola/claude-night-market --skill night-market-collective-memory -a claude-code`. Or copy the skill folder (.claude/skills/night-market-collective-memory in athola/claude-night-market) into .claude/skills/night-market-collective-memory in your project. Claude Code loads it when a task matches its description.

How do I install Night Market Collective Memory in Codex?

Run `npx skills add athola/claude-night-market --skill night-market-collective-memory -a codex`. Or copy the skill folder (.claude/skills/night-market-collective-memory in athola/claude-night-market) into .agents/skills/night-market-collective-memory in your project. Codex loads it when a task matches its description.

Can I use Night Market Collective Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill night-market-collective-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/night-market-collective-memory, .gemini/skills/night-market-collective-memory, .github/skills/night-market-collective-memory and .opencode/skills/night-market-collective-memory in your project.

What does Night Market Collective Memory need to run?

Going by SKILL.md and its folder, Night Market Collective Memory needs the command-line tools its instructions call (gh, rg and python3). Our summary lists: Python 3.

Does Night Market Collective Memory access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Night Market Collective Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Night Market Collective Memory use?

Night Market Collective Memory is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Night Market Collective Memory use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Night Market Collective Memory?

Skills that share tags, products or a category with Night Market Collective Memory: Remember (antonio-orionus/Arroxy, 397 stars), Capture Knowledge (adamayoung/TMDb, 178 stars), AI Project Memory (tudoumashu/ai-memory-skillpack, 456 stars) and Ogham Research (ogham-mcp/ogham-mcp, 115 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Night Market Collective Memory?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 341 GitHub stars. The repository holds 152 skills in this directory. The repository was last updated on October 9, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.