AGENT SKILL

ac-audit-logging

Building logs that serve as evidence rather than telemetry: what events an audit trail must record and who its reader is, tamper-evidence through hash chaining and external anchoring, append-only storage and the deletion problem, query patterns for investigators, retention and privacy tension with the trail's purpose, structured event schema for auditability, and the written audit record. It explains how to make a log that can be trusted after the fact; it never recommends a log product and never claims tamper-proof, only tamper-evident. Use when asking "audit log", "tamper evident", "hash chain log", "append only log", "who changed this record", "immutable log", "audit trail design", "compliance evidence", "log integrity", "sequence number gap". Not for observability and SLO telemetry (ac-reliability), not for structured logging in general (ac-reliability), not for access control decisions themselves (ac-security-engineer).

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

01 前言 Front Matter

name
ac-audit-logging
status
seedling
license
MIT
metadata
{ "domain": "software-engineering" }
description
Building logs that serve as evidence rather than telemetry: what events an audit trail must record and who its reader is, tamper-evidence through hash chaining and external anchoring, append-only storage and the deletion problem, query patterns for investigators, retention and privacy tension with the trail's purpose, structured event schema for auditability, and the written audit record. It explains how to make a log that can be trusted after the fact; it never recommends a log product and never claims tamper-proof, only tamper-evident. Use when asking "audit log", "tamper evident", "hash chain log", "append only log", "who changed this record", "immutable log", "audit trail design", "compliance evidence", "log integrity", "sequence number gap". Not for observability and SLO telemetry (ac-reliability), not for structured logging in general (ac-reliability), not for access control decisions themselves (ac-security-engineer).

02 资源文件 10

03 SKILL.md 正文

Audit logging

Overview

An audit log is a different object from a telemetry log. Telemetry answers "how is the system behaving"; an audit trail answers "who did what, when, and what was the state before" — and its reader is not an engineer at a dashboard but an investigator, an auditor, or a court, months later, possibly hostile to the system's operators. Everything about its design follows from that reader.

The central property is integrity: a trail that can be edited after the fact is not evidence, and the honest engineering term is tamper-evident, not tamper-proof. Hash chaining makes local edits detectable; anchoring the chain's head somewhere the system cannot reach makes even a full rewrite visible. The second property is completeness — the absence of an expected event is itself a finding, which means sequence gaps must be visible rather than smoothed over.

Primary sources: https://csrc.nist.gov/pubs/sp/800/92/final and https://www.rfc-editor.org/rfc/rfc6962.html.

When to use

  • When a system must answer who changed what, and when.
  • When a compliance or regulatory regime requires evidence-grade records.
  • When log integrity must survive a compromised host.
  • When designing what an investigator can query, years later.

When NOT to use

  • For operational telemetry and SLO metrics (use ac-reliability).
  • For application logging in general (use ac-reliability).
  • For authorization and access-control rules (use ac-security-engineer).

Subskill Index

Leaf Domain segment Scope (one line)
subskills/what-to-record.md software-engineering/what-to-record The event set, the actor identity problem, and the before-and-after state.
subskills/hash-chaining-and-anchoring.md software-engineering/hash-chaining-and-anchoring Chain each entry to its predecessor and anchor the head off-host.
subskills/append-only-storage.md software-engineering/append-only-storage Write-once storage, the deletion problem, and who can rotate.
subskills/sequence-and-gaps.md software-engineering/sequence-and-gaps Sequence numbers, visible gaps, and the silence they can indicate.
subskills/investigator-queries.md software-engineering/investigator-queries Answering who-changed-what-when without a forensic project.
subskills/retention-and-privacy.md software-engineering/retention-and-privacy Retention law, personal data in the trail, and redaction without rewriting.
subskills/audit-record.md software-engineering/audit-record The written audit record: event set, chain, storage, and verification.

Status and honest limits

Audit trails are governed by rules that vary by jurisdiction and regime, and this skill designs the engineering object, not the compliance opinion — whether a given trail satisfies a given regulation is a question for the accountable officer. The integrity mechanisms here detect alteration; they do not prevent a sufficiently privileged attacker from stopping the logger entirely, which is why the record treats silence as a signal, not an absence of news.

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