implement-audit-trail SKILL.md skillA
implement-audit-trail from pjt222/agent-almanac is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add pjt222/agent-almanac/implement-audit-trail@v1.0Pins v1.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- pjt222/agent-almanac
- Path
i18n/caveman-lite/skills/implement-audit-trail/SKILL.md- Versions recorded
- 3
- Latest version
- v1.0, committed Aug 17, 2026
- First version recorded
- Apr 19, 2026
- Size
- 10,737 bytes
- Repository stars
- 43
- License
- MIT
Implement audit trail functionality for R projects in regulated environments. Covers logging, provenance tracking, electronic signatures, data integrity checks, and 21 CFR Part 11 compliance. Use when an R analysis requires electronic records compliance (21 CFR Part 11), when you need to track who did what and when in an analysis, when implementing data provenance tracking, or when creating tamper-evident analysis logs for regulatory submissions.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Implement Audit Trail
Add audit trail capabilities to R projects for regulatory compliance.
## When to Use
- R analysis requires electronic records compliance (21 CFR Part 11)
- Need to track who did what, when, and why in an analysis
- Implementing data provenance tracking
- Creating tamper-evident analysis logs
## Inputs
- **Required**: R project with data processing or analysis scripts
- **Required**: Regulatory requirements (which audit trail elements are mandatory)
- **Optional**: Existing logging infrastructure
- **Optional**: Electronic signature requirements
## Procedure
### Step 1: Set Up Structured Logging
Create `R/audit_log.R`:
```r
#' Initialize audit log for a session
#'
#' @param log_dir Directory for audit log files
#' @param analyst Name of the analyst
#' @return Path to the created log file
init_audit_log <- function(log_dir = "audit_logs", analyst = Sys.info()["user"]) {
dir.create(log_dir, showWarnings = FALSE, recursive = TRUE)
log_file <- file.path(log_dir, sprintf(
"audit_%s_%s.jsonl",
format(Sys.time(), "%Y%m%d_%H%M%S"),
analyst
))
entry <- list(
timestamp = format(Sys.time(), "%Y-%m-%dT%H:%M:%S%z"),
…Read the whole file at its exact version.
How to install
mdr add pjt222/agent-almanac/implement-audit-trail@sha256:db9758edd01fcc84The line at the top of this page pins the label v1.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_bkq6fv6reevdsxeg)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Apr 19, 2026 and Aug 17, 2026, about one every 60 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.0 latest | 2026-08-17 | a784899 | 10,737 B | A | view · diff |
| v1.0 | 2026-04-24 | b4968e1 | 10,708 B | A | view · diff |
| v1.0 | 2026-04-19 | e334ebd | 10,763 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (10737 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
pjt222/agent-almanac · 43 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_bkq6fv6reevdsxeg GET https://markdownregistry.com/api/v1/resolve?ref=pjt222/agent-almanac/implement-audit-trail GET https://markdownregistry.com/api/v1/blob/db9758edd01fcc8465dc06d325ac1ae40edf5fe7ae75df277adcfd4a3e909f42
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.