cog: Command for Claude Code

.claude/commands/foresight.md

foresight is a command for Claude Code from marciopuga/cog. It costs 60 tokens per session (1,162 once invoked), scanned A, original, MIT.

A command that reviews stored information across different areas of life or work to spot connections, changing pace, and upcoming opportunities or risks.

In plain words
What is it for?
It scans domain notes, recent context, and action lists, then writes one practical suggestion when there is enough information.
Why use it?
It avoids forcing predictions when the stored history is too small or limited to one area.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is marciopuga/cog's own configuration. It tells Claude Code how to work on cog 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 cog configures →

Reuse

Borrowing it

Nothing to install: this file belongs to marciopuga/cog. 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/marciopuga/cog/main/.claude/commands/foresight.md
Clone the repo
git clone --depth 1 https://github.com/marciopuga/cog

Made for: Claude Code.

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 foresight

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/marciopuga/cog/foresight"><img src="https://agentmods.dev/badge/commands/marciopuga/cog/foresight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,162 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.00060 $0.01162
Opus 5.5 $0.00024 $0.00465
Sonnet 5.5 $0.00012 $0.00232
Haiku 4.5 $0.00006 $0.00116

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

Security

Grade A, and why

foresight 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 2mo 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.

.claude/commands/foresight.md · 123 lines

How it starts

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

Cog Foresight

Strategic foresight — connecting dots across domains. Future-facing.

This is NOT reflect (past-facing). Foresight scans broadly and projects trajectories.

Run on demand, not on a schedule. A nudge nobody asked for is noise; a nudge in answer to "what should I be thinking about?" is the point. The nudge is delivered in the conversation — the file is the record, and it surfaces again through the retrieval protocol's Overview query type while it's fresh.

Memory Path

All files under the resolved memory path: $COG_HOME/memory/ if COG_HOME is set, otherwise ~/cog/memory/.

Minimum Data Check

Before scanning, verify there's enough material for meaningful foresight:

  • If total observations across all domains < 10: stop. Say "Not enough history for strategic foresight. Keep capturing for a few more weeks."
  • If only 1 domain has data: say "Foresight works best with 2+ active domains (it connects dots between them). Consider adding more domains or building out existing ones."
  • If no action items exist: say "No active items to assess velocity on. Capture some tasks first."

Don't force a nudge from thin data. One honest "not yet" is better than a weak insight.

Files to Read

Read broadly — this is a scan:

  1. Read memory/domains.yml to discover all active domains
  2. For each domain: hot-memory.md + action-items.md
  3. Also read:
    • memory/hot-memory.md (cross-domain context)
    • memory/personal/entities.md (birthdays, relationships)
    • memory/personal/calendar.md (upcoming events)
    • memory/personal/health.md (health trajectory)
    • Recent observations across all domains (last 7 days)
    • Thread current-state sections

Process

1. Cross-Domain Convergence

Look for topics, people, or themes appearing in 2+ domains simultaneously. These are convergence points — where effort in one area compounds into another.

2. Velocity & Stall Detection

Classify active items:

  • Accelerating — multiple updates last week. Signal: ride the wave.
  • Cruising — steady progress. Signal: nothing to flag.
  • Stalling — no movement 2+ weeks. Signal: blocked or lost priority?
  • Dormant — domain silence 4+ weeks. Signal: conscious or drift?

Read the full file on GitHub · 123 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. 2mo ago Changed · +3 lines · +21 tokens per session f7bd36d71d44
  2. 2mo ago First seen · 120 lines · 39 tokens per session scan A 8252cc63d3d8

Subscribe to this mod's changes

foresight is a command published in the GitHub repository marciopuga/cog (377 stars, last pushed 2mo ago), licensed MIT. It adds 60 tokens to every session and 1,162 once invoked, about $0.0002 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.

Related

foresight compared with commands from other repositories

foresight next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
foresightmarciopuga/cogCommand3772mo agoMITA60Claude Code
checklistgithub/spec-kitCommand148kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand148kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand148kyesterdayMITA13Claude Code
analyzegithub/spec-kitCommand148kyesterdayMITA26Claude Code
convergegithub/spec-kitCommand148kyesterdayMITA35Claude Code
implementgithub/spec-kitCommand148kyesterdayMITA14Claude Code