AGENT SKILL

ac-service-lifecycle

The start-to-stop life of a long-running service: startup ordering and readiness versus liveness, configuration load and validation before traffic, graceful shutdown and connection draining, in-flight work at termination, health endpoints and their levels, dependency startup order and circuit-breaking into unavailable dependencies, and the written lifecycle record. It explains how a service comes up and goes down correctly; it never recommends a runtime or orchestrator and never promises an availability. Use when asking "readiness versus liveness", "graceful shutdown", "connection draining", "health check", "startup ordering", "SIGTERM handling", "warmup", "why do requests fail during deploys", "why does the service start but crash after". Not for CI pipeline wiring and deployment strategy (ac-ci-and-release), not for resilience budgets around steady-state calls (ac-resilience-budgets), not for container and runtime configuration (ac-performance).

License 许可
MIT
最近更新
2026-11-15
Stars
★ 81
Forks
17

01 前言 Front Matter

name
ac-service-lifecycle
status
seedling
license
MIT
metadata
{ "domain": "software-engineering" }
description
The start-to-stop life of a long-running service: startup ordering and readiness versus liveness, configuration load and validation before traffic, graceful shutdown and connection draining, in-flight work at termination, health endpoints and their levels, dependency startup order and circuit-breaking into unavailable dependencies, and the written lifecycle record. It explains how a service comes up and goes down correctly; it never recommends a runtime or orchestrator and never promises an availability. Use when asking "readiness versus liveness", "graceful shutdown", "connection draining", "health check", "startup ordering", "SIGTERM handling", "warmup", "why do requests fail during deploys", "why does the service start but crash after". Not for CI pipeline wiring and deployment strategy (ac-ci-and-release), not for resilience budgets around steady-state calls (ac-resilience-budgets), not for container and runtime configuration (ac-performance).

02 资源文件 10

03 SKILL.md 正文

Service lifecycle

Overview

A service spends its life starting, serving, and stopping — and two of those three are where correctness is lost. A service that starts before its dependencies are ready accepts traffic it cannot serve; a service that stops without draining abandons requests mid-flight. The steady state in between is what most engineering attention covers, but the edges are what actually page people at night.

This skill covers the edges. Startup covers the ordering of dependency checks and the difference between being alive and being ready to serve. Shutdown covers signal handling, the drain sequence, and what happens to work in progress. Health endpoints cover what each check should and should not verify. The deployment story — pipelines and rollouts — is a different skill; so are steady-state resilience and container tuning.

Primary sources: https://sre.google/ and https://martinfowler.com/.

When to use

  • When a service starts slowly, crashes after startup, or serves errors during warmup.
  • When deploys drop in-flight requests or connections pile up at shutdown.
  • When health endpoints flap or say healthy while the service cannot serve.
  • When a service depends on others that may not be up when it starts.

When NOT to use

  • For pipelines, release strategy, and rollout mechanics (use ac-ci-and-release).
  • For timeouts, retries, and circuit breakers around steady-state calls (use ac-resilience-budgets).
  • For container CPU and memory tuning (use ac-performance).

Subskill Index

Leaf Domain segment Scope (one line)
subskills/startup-and-readiness.md software-engineering/startup-and-readiness Startup ordering, readiness versus liveness, and refusing traffic until able.
subskills/configuration-load.md software-engineering/configuration-load Loading and validating configuration before accepting work.
subskills/graceful-shutdown.md software-engineering/graceful-shutdown Signal handling, drain sequences, and deadline-driven termination.
subskills/in-flight-work.md software-engineering/in-flight-work Requests, jobs, and transactions that are running when termination arrives.
subskills/health-endpoints.md software-engineering/health-endpoints Liveness, readiness, and what each check should actually verify.
subskills/dependency-ordering.md software-engineering/dependency-ordering Starting against dependencies that are slow, absent, or flapping.
subskills/lifecycle-record.md software-engineering/lifecycle-record The written record: startup steps, drain plan, deadlines, and health semantics.

Status and honest limits

Lifecycle behaviour depends on the runtime and orchestrator, which differ in signal delivery, timeout defaults, and kill semantics; the mechanics here are portable, the defaults are not. Nothing here recommends a runtime, and a shutdown plan that has never been tested under production load is a plan that will be discovered to be wrong during the first incident it was written for.

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