AGENT SKILL

renew-acme-certificates-before-expiry

Use when running or auditing TLS certificates issued by ACME (Let's Encrypt, ZeroSSL). Automate renewal on a schedule, prove the renewal path actually works, and alert on expiry as a backstop rather than as the primary trigger.

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

01 前言 Front Matter

name
renew-acme-certificates-before-expiry
description
Use when running or auditing TLS certificates issued by ACME (Let's Encrypt, ZeroSSL). Automate renewal on a schedule, prove the renewal path actually works, and alert on expiry as a backstop rather than as the primary trigger.

02 资源文件 3

03 SKILL.md 正文

Renew ACME certificates before expiry

A certificate that expires takes the whole site down, and "cron will handle it" is not a plan until you have watched it renew and reload. Automate the happy path and keep a hard expiry alarm behind it.

Procedure

  1. Inventory what is issued and when each expires:
    certbot certificates 2>/dev/null | grep -E 'Certificate Name|Expiry'
    
    For files not managed by certbot, read the date off the wire (see debug-tls-handshake-with-openssl).
  2. Run a dry run first — it exercises the ACME challenge without touching the live cert:
    certbot renew --dry-run
    
    This is the only proof that DNS/HTTP-01 challenges still solve.
  3. Install a renewal timer and confirm it is enabled, not just present:
    systemctl list-timers | grep certbot
    systemctl status certbot.timer --no-pager
    
  4. Renew well inside the 30-day window; certbot renews at 30 days left by default:
    certbot renew --deploy-hook 'systemctl reload nginx'
    
    The --deploy-hook reload is what actually serves the new cert; without it the file changes and the running server keeps the old one in memory.
  5. For wildcard or DNS-01 certs, verify the provider credential still has rights:
    certbot renew --dry-run --preferred-challenges dns
    
  6. Add an independent expiry monitor so a broken renewal is loud, not silent:
    echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
      | openssl x509 -noout -enddate
    
    Alert when notAfter is under 14 days.
  7. After a real renewal, confirm the served cert changed — not just the file on disk:
    openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
      | openssl x509 -noout -serial
    

Pitfalls

  • Certbot renews asynchronously to a timer; a cert that "should" renew can sit until someone runs it manually.
  • A --deploy-hook that fails (reload without sudo, wrong unit name) renews the file but never reloads.
  • Rate limits on Let's Encrypt (5 duplicate certs/week) turn a retry loop into a week-long outage.
  • HTTP-01 challenges break when the site forces HTTPS or redirects the .well-known path.
  • Wildcard certs require DNS-01; an HTTP-01 config silently fails for them.
  • Monitoring only the file's mtime misses a server that loaded an old cert at start and never reloads.
  • The backup/monitor host may not be able to reach the ACME server (egress firewall), failing only in prod.

Verification

certbot renew --dry-run && \
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
  | openssl x509 -noout -enddate

Pass means the dry run reports "simulated renewal succeeded" and the served cert's notAfter is more than 14 days out. Report the serial before and after a real renewal to prove the reload happened.

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