document-management

document-management is a skill for Claude Code, Codex from serac-labs/serac. It costs 61 tokens per session (4,015 once invoked), scanned A, original, Apache-2.0.

A ServiceNow guide for handling files attached to records, creating documents from templates, managing document versions, and checking access. ServiceNow is a platform for managing business workflows and records.

In plain words
What is it for?
Use it to upload or read attachments, copy files between records, generate documents from report templates, manage document-management records, and verify attachment access.
Why use it?
It explains which ServiceNow records store attachment details and file contents, reducing mistakes when uploading, reading, copying, generating, or protecting documents.

Skill for Claude CodeCodex

Part of the skills plugin — 56 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/serac-labs/serac/document-management
Any agent
npx skills add serac-labs/serac --skill document-management
Clone the repo
git clone --depth 1 https://github.com/serac-labs/serac

Made for: Claude Code, Codex.

Or install skills, the plugin that ships this one along with the rest of its 56 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for document-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/serac-labs/serac/document-management.svg)](https://agentmods.dev/skills/serac-labs/serac/document-management)
Your own site
<a href="https://agentmods.dev/skills/serac-labs/serac/document-management"><img src="https://agentmods.dev/badge/skills/serac-labs/serac/document-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,015 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00061 $0.04015
Opus 5 $0.00030 $0.02008
Sonnet 5 $0.00012 $0.00803
Haiku 4.5 $0.00006 $0.00402

Measured 4d ago against content hash a7bd9f62af43, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

document-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/skills/document-management/SKILL.md · 526 lines

How it starts

The opening of the file, as written. The whole thing — 526 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Document Management for ServiceNow

Document Management handles attachments, templates, and document generation.

Document Architecture

Record
    ├── Attachments (sys_attachment)
    │   └── Attachment Data (sys_attachment_doc)
    ├── Generated Documents
    └── Document Templates

Key Tables

Table Purpose
sys_attachment Attachment metadata
sys_attachment_doc Attachment content
sys_report_template Report templates
dms_document Document records

Attachments (ES5)

Upload Attachment

// Attach file to record (ES5 ONLY!)
function attachFile(tableName, recordSysId, fileName, contentType, content) {
  var attachment = new GlideSysAttachment()

  // Content can be base64 encoded string
  var attachmentSysId = attachment.write(tableName, recordSysId, fileName, contentType, content)

  return attachmentSysId
}

// Example
var base64Content = "SGVsbG8gV29ybGQh" // Base64 encoded
attachFile("incident", incidentSysId, "notes.txt", "text/plain", base64Content)

Read Attachment

// Read attachment content (ES5 ONLY!)
function getAttachmentContent(attachmentSysId) {
  var attachment = new GlideSysAttachment()
  var content = attachment.getContent(attachmentSysId)
  return content
}

// Get attachment as base64
function getAttachmentBase64(attachmentSysId) {
  var attachment = new GlideSysAttachment()
  var bytes = attachment.getBytes(attachmentSysId)

  // Convert to base64
  var base64 = GlideBase64.encode(bytes)
  return base64
}

List Attachments

// Get all attachments for record (ES5 ONLY!)
function getRecordAttachments(tableName, recordSysId) {
  var attachments = []

  var gr = new GlideRecord("sys_attachment")
  gr.addQuery("table_name", tableName)
  gr.addQuery("table_sys_id", recordSysId)
  gr.query()

  while (gr.next()) {
    attachments.push({
      sys_id: gr.getUniqueValue(),
      file_name: gr.getValue("file_name"),
      content_type: gr.getValue("content_type"),
      size_bytes: gr.getValue("size_bytes"),
      created_on: gr.getValue("sys_created_on"),
      created_by: gr.sys_created_by.getDisplayValue(),
    })
  }

  return attachments
}

Read the full file on GitHub · 526 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 526 lines · 61 tokens per session scan A a7bd9f62af43

Subscribe to this mod's changes

document-management is a skill published in the GitHub repository serac-labs/serac (78 stars, last pushed 9d ago), licensed Apache-2.0. It adds 61 tokens to every session and 4,015 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

esporta-documento

Esporta un deliverable legale (parere, informativa privacy, DPA, DPIA, registro trattamenti, parcella, atto, analisi giurisprudenziale) in un file Word (.docx) e/o PDF nella cartella attiva. Usa quando l'utente chiede di "esporta in word", "esporta in pdf", "salva il documento", "genera docx", "genera pdf", "metti in…

capazme/mcp-legal-it · 157 tokens

contract-analyzer

OCR a contract PDF with mistralocr, then extract structured clauses and risk scores with mistralchat + jsonschema. Use when the user provides a contract document to analyze for risks, obligations, and key terms.

Swih/mistral-mcp · 44 tokens

pdf-invoice-extractor

OCR a PDF invoice with mistralocr and extract structured line-item data (vendor, date, amounts, VAT) for accounting reconciliation. Use when the user provides an invoice PDF to process.

Swih/mistral-mcp · 39 tokens

procure-quotazioni

Genera in serie procure alle liti (art. 83 c.p.c.) e lettere di quotazione compensi D.M. 55/2014 in DOCX per posizioni di recupero crediti, partendo da un Excel di posizioni o dai dati forniti, con rilevamento della fase processuale (monitorio, esecuzione forzata, opposizione a decreto ingiuntivo). Usa quando l'utente…

capazme/mcp-legal-it · 181 tokens

company-directories

Use when extracting structured company lists from public or authorized directories into JSON, CSV, CRM-ready lists, or research tables.

dinglebear-ai/axon · 28 tokens

adversarial-verify

Use after completing any substantive piece of work (code change, analysis, document, configuration, answer to a hard question) and BEFORE presenting it as done. Switches you from author to attacker - you try to refute your own work and only present it if it survives. Do not skip because the work "looks clean"…

ericlovold/sanction · 82 tokens