agentleFS
ChainGPT-orgChainGPT-org/chaingpt-claude-skill/skills/scheduled-autonomy/SKILL.md

scheduled-autonomy

Skill6 starsChanged 3 months agoMITView on GitHub

Run trading/DeFi strategies on a schedule — DCA every morning, grid rebalances, recurring health checks — using saved plans + the execution journal (due_steps/mark_step) + Claude Code scheduled agents, with the agent wallet executing inside hard policy caps. Triggers - run this daily, schedule a DCA, recurring buy, set and forget, autonomous strategy, cron strategy, execute my plan on a schedule, walk away.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. xxxupeng/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository23 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Claude Code's scheduled agents (/schedule) or any cron that invokes claude:

    line 37
  2. Very specific:

    Already-marked refusal means double-fire: If mark_step says the step is already recorded, do NOT overwrite — investigate why the tick ran …

    line 54
  3. Very specific:

    The policy gate's refusal is final: If sign_and_send is refused (daily cap reached, kill switch on), mark NOTHING, report the refusal, and …

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Scheduled Autonomy — strategies that run while the user sleeps

The full loop for hands-off strategy execution. Three layers make it safe:

  1. The plan is explicit and saved to disk (what to do, when).
  2. The execution journal makes runs idempotent (crashes and re-runs never double-buy).
  3. The agent-wallet policy gate caps what any single run, or day, can spend — maxTxValueWei per tx, maxDailySpendWei + maxDailyTxCount per rolling 24h. The schedule cannot exceed the policy even if it fires a thousand times.

The loop (memorize this shape)

ONE-TIME SETUP
  1. chaingpt_strategy_dca_plan ...                 # produces steps + a JSON payload
  2. chaingpt_risk_token / chaingpt_research_token  # pre-flight the asset ONCE
  3. chaingpt_strategy_save_plan name=eth-dca type=dca payload=<the JSON>
  4. Agent wallet ready: chaingpt_agent_wallet_status
     → recommend the "DCA bot" policy template (single chain, single router, small caps)
  5. Create the schedule (see below)

EVERY SCHEDULED TICK (this is the prompt the schedule runs)
  1. chaingpt_strategy_due_steps name=eth-dca       # what's due? nothing → done, exit
  2. For each due step:
       a. chaingpt_dex_quote ...                    # fresh quote, sanity-check price impact
       b. execute:
          - agent-wallet mode: chaingpt_agent_wallet_sign_and_send (policy gate decides)
          - user-signs mode:   chaingpt_dex_build_swap_tx acknowledgeMainnet=true → present tx
       c. chaingpt_strategy_mark_step name=eth-dca stepId=<id> txHash=<hash>   # IMMEDIATELY
  3. Report: step(s) executed, spend vs daily cap, next step time

Creating the schedule (Claude Code)

Use Claude Code's scheduled agents (/schedule) or any cron that invokes claude:

/schedule create "eth-dca tick" --cron "0 9 * * *" --prompt
  "Run one tick of the saved plan 'eth-dca': call chaingpt_strategy_due_steps name=eth-dca;
   if nothing is due, stop. For each due step: fresh chaingpt_dex_quote (abort the step and
   mark it skipped with a note if price impact > 1%), execute via the agent wallet
   (chaingpt_agent_wallet_sign_and_send, memo 'eth-dca step <id>'), then immediately
   chaingpt_strategy_mark_step with the tx hash. Finish with a one-line summary."

Cadence note: schedule ticks MORE often than the plan cadence if you want catch-up behavior (a daily plan + daily tick that fails once skips a day; a daily plan + 6-hourly tick self-heals). due_steps returns everything overdue, so catch-up is automatic — the daily-spend cap bounds how much catch-up can execute at once.

Hard rules

  • Mark immediately after execution. An executed-but-unmarked step is returned again next tick. The journal is the only memory the schedule has.
  • Never mark before the tx is sent. A marked-but-unexecuted step is silently lost money on the table.
  • Already-marked refusal means double-fire. If mark_step says the step is already recorded, do NOT overwrite — investigate why the tick ran twice.
  • The policy gate's refusal is final. If sign_and_send is refused (daily cap reached, kill switch on), mark NOTHING, report the refusal, and stop. Never coach the user into widening caps mid-run; that decision belongs to a non-scheduled session.
  • Pre-flight the asset once at setup, and re-check risk weekly (chaingpt_risk_token) for long-running plans — tokens get compromised after launch too.
  • Plans + journal are local files (~/.chaingpt-mcp/plans/). Nothing is uploaded.

Failure handling

SituationBehavior
RPC/quote upstream downSkip the tick (steps stay due; next tick catches up)
Price impact above the user's thresholdmark_step status=skipped note="impact 2.3%" — a skipped step is a decision, not a failure
Policy refusal (caps/kill switch)Stop the tick, report, leave steps due
Plan completedue_steps says COMPLETE — tell the user to remove the schedule

Modes

  • Agent-wallet mode (fully autonomous): the wallet signs inside policy caps. Pair with the dca-base policy template. The PreToolUse mainnet guard will ask for confirmation in interactive sessions; for headless scheduled runs, the policy gate + velocity caps are the (deliberate) safety boundary — set CHAINGPT_GUARD=off ONLY in the scheduled environment, never globally.
  • User-signs mode (semi-autonomous): the tick prepares unsigned transactions and the summary asks the user to sign. Zero custody risk; the user is the scheduler's hands.

Solana plans (v1.19+): same loop with chaingpt_dex_jupiter_quote → chaingpt_dex_jupiter_build_swap_tx → chaingpt_agent_wallet_solana_sign_and_send → chaingpt_strategy_mark_step. The lamport velocity caps (policy.solana.maxDailySpendLamports / maxDailyTxCount) are the third safety layer, exactly like the wei caps on EVM.

Related: skills/strategy/SKILL.md (planners), skills/agent-wallet/SKILL.md (policy gate), reference/scheduled-autonomy.md (10-minute end-to-end walkthrough).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.