AGENT SKILL

context-cycle-proactive

At 80-90% context, save to the brain, route to the right channel, load fresh context, and resume. Built-in lifecycle so every agent stays synced to the second brain and never drops work.

适用职业人力资源
License 许可
MIT
最近更新
2026-11-15
Stars
★ 81
Forks
17

01 前言 Front Matter

name
context-cycle-proactive
tags
[ "context", "memory", "resume", "session-hygiene", "save", "brain" ]
author
Gentech
license
MIT
version
1.1.0
description
At 80-90% context, save to the brain, route to the right channel, load fresh context, and resume. Built-in lifecycle so every agent stays synced to the second brain and never drops work.

02 资源文件 3

03 SKILL.md 正文

Context Cycle — Proactive Save & Resume

When to Use

  • Conversation/working context reaches 80-90% and you can't make room (the trigger).
  • Mid-way through a big build and you hit a natural stopping point.
  • The user says "save progress," "start new," "load a new context," or "/new."
  • You notice memory pressure and want to save before it drops the ball.

The Problem This Solves

Even with a large context window, active build sessions fill up fast. When context hits ~80-90% and you can't make room, the session degrades and work gets dropped. This is the proactive protocol: you detect the pressure, save your place to the brain, route the log to the right channel, load a fresh context, and pick the task back up.

The Cycle — 5 Steps (Save → Route → Load → Resume)

Step 1: SAVE progress to the brain (vault / second brain)

Write a dated progress file to the vault so nothing is lost. Use the context bridge generator if available, then fill it in:

python3 <path-to>/session-hygiene/scripts/context-save.py   # if present in the agent

Capture the real content (bridge path varies by setup; the principle is the same):

  • Active work: what you were building, current task, dependencies
  • Decisions made: the calls taken + reasoning
  • Blockers: anything stuck or needing the user/another lane
  • Next steps: the exact resume point, so the next session picks up cleanly

Rule: Save where you are BEFORE you move on. Never let memory fill up and drop the ball.

Step 2: ROUTE the log to the right channel

Decide where the progress note belongs. This is the agent's judgment call — where does this work need to live, and who needs to see it?

Content Channel / folder
Coordination, decisions, blockers, status HQ (your main group, 00-HQ/)
Ideas, considerations, open questions Mess Hall (11-Mess Hall/considerations.md)
Heavy build / code / dev progress Labs (01-HANDOFFS/gentech-to-labs/)
Finance / treasury / yield Treasury (01-HANDOFFS/gentech-to-treasury/)
Content / social / hackathon Entertainment (01-HANDOFFS/gentech-to-entertainment/)

For cross-agent work, drop a handoff file into the relevant 01-HANDOFFS/<lane>/ folder so that lane's agent picks it up on wake-up. Sync the vault after writing so the second brain and backups have it: cd <vault> && ob sync (or your repo's sync command).

Step 3: LOAD a fresh context

Compact / start a new session so the context window is clear. Tell the user:

"Memory at [X]% — saved progress to the brain, logged to [channel]. Ready for /new?"

If /new isn't wanted yet, at minimum clear the working context via compaction so the window is fresh but the save is already in the vault.

Step 3a: PROMPT the user to start new when you can't do it yourself (Jordan directive Aug 16 2026)

The problem it fixes: agents cut it close at high memory instead of starting a fresh context — so work gets dropped or the session degrades. An agent often CANNOT start a new context on its own (no /new access, no self-compaction). The fix is to ask the user, explicitly and early, instead of pushing to the edge.

The rule — at ~85% memory (or the agent's execute threshold), prompt the user:

"I'm going to save progress and log everything to the brain. Go ahead and start new (/new), and we can continue the conversation."

Do this BEFORE the save is critical, not after. The sequence:

  1. Save progress to the brain (Step 1) + route the log (Step 2) — so nothing is lost.
  2. Prompt the user to start new — give them the exact words to say/type.
  3. On the fresh session, load the resume point (Step 4) and continue — do NOT restart.

Why this matters: a lost save is never worth the extra minutes of context. Prompting the user to start new is the reliable way to clear the window when the agent can't do it itself. This is a labeled, required behavior — not a nice-to-have.

Step 4: RESUME the task

On the fresh session (or after compaction), load the resume point:

  1. Read the latest context bridge / latest-context.md
  2. Read the relevant handoff file if you wrote one in Step 2
  3. Re-establish: what was in progress, decisions, next steps
  4. Continue the task from the exact checkpoint — do NOT restart it

Step 5: CONFIRM continuity

Verify the resume landed: the task picks up where it stopped, no duplicate work, and the next cycle starts from the new checkpoint. If anything was lost, recover from the vault archive / session search rather than redoing it.

Context Thresholds — tiered by model window (Jordan approved Aug 11 2026)

The execute point depends on the model's context window, not one flat number. A single threshold either churns fast agents (interrupting healthy long builds) or strands slow ones.

Agent Window 80% (think) Execute save Why
Forge (DeepSeek Flash) 5M tokens 85% 90% Huge headroom, quality holds late
Gentech (GLM 5.2 / DeepSeek V4 Flash) 128K 80% 85% Degrade begins past ~85%
Gentech Flash (GLM 4.5 Flash) 64K 80% 80% Small window fills fast, degrade hits earlier

Rule (Jordan): save EARLY rather than late. At 80% you don't wait — you assess the road ahead (next task size, next stop) and start the save if the path looks long. Losing a save is never worth pushing context to the limit. The 85/90 execute is the firm backstop; the 80% assessment + natural-stopping-point rule is the real protection.

Pitfalls

  • Don't skip Step 1 (save) — routing to a channel without first saving progress means the next session has no resume point.
  • Don't just say "memory's full" — always execute the cycle: save → route → load → resume.
  • Don't restart a finished task — if the save shows the task was complete, don't redo it.
  • Cross-agent work needs a handoff file — logging to your own group alone doesn't wake up the other agents.
  • Sync the brain — a local file nobody pushed doesn't help other agents or backups.

Verification

After a cycle, confirm:

  1. Progress saved to the context bridge (dated file exists)
  2. Log routed to the correct channel/handoff folder
  3. Brain synced (sync command ran)
  4. Resume point identified in the latest bridge file
  5. Fresh context loaded; task resumes from the checkpoint, not from scratch

04 同仓库更多 Skills

jiayaoqijia
jiayaoqijia/cryptoskill

troves

Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

trade

Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

staking

Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

send

Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

portfolio

View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

multi-swap

Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.

★ 81