[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACFE1684DE184VE0D7PQVY":3,"skill-same:01M6ACFE1684DE184VE0D7PQVY":113},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":57,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6ACFE1684DE184VE0D7PQVY","file-forensics",null,"Examine what a file claims about itself and what it actually contains — powered by Apache Tika. True content-based type detection (extensions lie), provenance claims (authors, dates, creating application), revision and tamper signals (PDF incremental updates, tracked changes, hidden slides, zip integrity), hidden and embedded content (attachments, macros), risk indicators (PDF JavaScript actions, encryption), and content digests. Evidence gathering, not verdicts: Tika reports what the file asserts and what parsing observed; it does not attribute authorship or validate signatures. Use for triaging suspicious files, provenance questions, e-discovery-style review, or \"is this file what it claims to be.\"","apache\u002Ftika","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACEMPJD6J74AGZBFFEGEYV",4145,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,9,44,45,46],"file","forensics","file forensics","signatures","risk","evidence","zip","integrity","revision","signals","claims","reports","encryption","updates","files","actions","tika","review","content","validate","PDF","suspicious","javascript","2026-11-10 10:12:30",false,"---\nname: file-forensics\ndescription: >\n  Examine what a file claims about itself and what it actually contains —\n  powered by Apache Tika. True content-based type detection (extensions lie),\n  provenance claims (authors, dates, creating application), revision and\n  tamper signals (PDF incremental updates, tracked changes, hidden slides,\n  zip integrity), hidden and embedded content (attachments, macros),\n  risk indicators (PDF JavaScript actions, encryption), and content digests.\n  Evidence gathering, not verdicts: Tika reports what the file asserts and\n  what parsing observed; it does not attribute authorship or validate\n  signatures. Use for triaging suspicious files, provenance questions,\n  e-discovery-style review, or \"is this file what it claims to be.\"\n---\n\n\u003C!--\nLicensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements.  See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the \"License\"); you may not use this file except in compliance with\nthe License.  You may obtain a copy of the License at\n\n    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\nLocal override: `$TIKA_SKILLS_LOCAL\u002Ffile-forensics\u002FLOCAL.md` (default `~\u002F.tika-skills`),\nread after this file, wins on conflict.\n\n# File forensics with Apache Tika\n\n**What this can and cannot tell you.** Tika cannot tell you who wrote a\nfile. It can tell you — exhaustively — what the file *claims* about itself\nand what it actually *contains*, and those claims are the evidence: a\n`dc:creator` value is an assertion some software recorded, not an identity;\na template-default author, an inconsistency between claimed dates, or a\nconspicuously *missing* field is as much a finding as a present one. Report\nwhat the file says; let the human draw conclusions.\n\n**The one rule for reading Tika's output:** the key prefix tells you *who is\nasserting each fact*.\n\n- **`tk:*`** — Tika's own parse-time observations, which the file cannot\n  forge into place: magic-byte-detected type, embedded-item structure,\n  encryption status, digests of the actual bytes.\n- **Everything else** (`dc:`, `pdf:docinfo:`, `extended-properties:`,\n  `xmp:`, ...) — the file's claims about itself, recorded by whatever\n  software touched it, editable by anyone with a hex editor.\n\nDisagreement between the two classes is where findings live.\n\n**And one rule with no exceptions: no date in a file is an observation.**\nCreation, modification, and print timestamps — including the per-revision\ntimestamps inside PDF incremental updates — are written by software under\nthe control of whoever produced the file, and can be set to anything. Tika\ncan observe that a revision layer *exists*, how large it is, and what it\n*contains*; when it was written is only ever claimed. Report timestamps as\n\"the file records...\", never \"this happened at...\".\n\nSetup (getting tika-app or a tika-server) is covered by the\n`file-to-markdown` companion skill; this skill assumes one is available and\nuses the same invocation shapes. **Parse suspect files in isolation — this\nis not optional for forensics work.** tika-server and `tika-app -f` both\nparse in crash-isolated forked processes; for hostile-file triage prefer the\nDocker route with the input mounted read-only (see `file-to-markdown-docker`)\nso the parse can neither modify the evidence nor touch anything else.\n\nThe one-command forensics rig — the stock Tika image started with this\nskill's config (which IS the unlock on the server surface: none of these\nswitches are on by default there):\n\n```bash\ndocker run -d --rm --name tika-forensics -p 127.0.0.1:9998:9998 \\\n  -v \"$(pwd)\u002Ffile-forensics-config.json:\u002Ffile-forensics-config.json:ro\" \\\n  apache\u002Ftika:latest-full -c \u002Ffile-forensics-config.json\ncurl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Frmeta > suspect.rmeta.json\ndocker stop tika-forensics   # when done\n```\n\nGuaranteed OCR, read-only config, process isolation, explicit named\nconfiguration — in one command.\n\n## Workflow: capture once, then converse over the JSON\n\nThis skill is **not** \"run Tika and read the output into context.\" It's two\nphases:\n\n**Phase 1 — capture** (once per file): parse to disk with a digest,\n**extract every embedded file to disk**, and make a compact metadata-only\nview for the conversation:\n\n```bash\njava -jar tika-app.jar --config=file-forensics-config.json -J suspect.file > suspect.rmeta.json\njava -jar tika-app.jar --config=file-forensics-config.json -Z --extract-dir=evidence\u002Fsuspect-embedded suspect.file\n# (--digest=sha256 is only needed if you are NOT using the config;\n#  the config's built-in digester already covers it)\n# or, against the docker rig from the isolation section above:\n# curl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Frmeta > suspect.rmeta.json\n# curl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Funpack > suspect-embedded.zip\n# mkdir -p evidence\u002Fsuspect-embedded && unzip -q suspect-embedded.zip -d evidence\u002Fsuspect-embedded\n\njq 'map(del(.\"tk:content\"))' suspect.rmeta.json > suspect.meta.json\nls -lR evidence\u002Fsuspect-embedded && sha256sum evidence\u002Fsuspect-embedded\u002Funpacked\u002F*\n```\n\n`suspect.rmeta.json` is the full evidence record — a JSON array where entry\n0 is the file and entries 1+ are everything embedded in it, content\nincluded. `suspect.meta.json` is the same array with the (possibly huge)\nextracted text stripped out: small enough to inspect freely.\n`evidence\u002Fsuspect-embedded\u002F` holds **the literal embedded files** —\nattachments, images, macro source, each prior PDF revision as an openable\nPDF — and the examiner needs those, not descriptions of them. Extraction\nis part of capture, not a follow-up; tell the human where the directory is\nand what's in it as soon as it exists.\n\n**Phase 2 — investigate conversationally.** Each question the user asks\nbecomes a targeted query against the saved files, and only the answering\nvalues enter the conversation:\n\n```bash\njq 'length' suspect.meta.json                          # how many embedded items?\njq '.[0] | keys' suspect.meta.json                      # what fields exist at all?\njq '.[].[\"tk:embedded-resource-type\"]' suspect.meta.json\njq '.[0].\"pdf:incremental-update-count\"' suspect.meta.json\ngrep -o 'Normal.dotm' suspect.meta.json                 # quick claim checks\njq '.[2].\"tk:content\"' suspect.rmeta.json               # content of ONE entry,\n                                                        # only when asked\n```\n\nTwo queries worth running early on any file:\n\n```bash\n# inventory: one line per entry -- index, depth, type, name, content-type\njq -r 'to_entries[] | [.key, .value.\"tk:embedded-depth\", .value.\"tk:embedded-resource-type\",\n       .value.\"tk:resource-name\", .value.\"Content-Type\"] | @tsv' suspect.meta.json\n# every key that appears anywhere in the array -- what there is to ask about\njq '[.[] | keys[]] | unique' suspect.meta.json\n```\n\n**When the human wants to see everything**, they get three things: the\nextracted-files directory (open the images, the attachments, the prior\nrevisions — with whatever tools they normally use), and both JSON files:\n`suspect.rmeta.json` is the complete record, content included;\n`suspect.meta.json` is the same thing without the text, which is what you\nwant when the text runs to megabytes and drowns the metadata in a viewer.\nPoint them at whatever is already on the machine:\n\n- `jq . suspect.rmeta.json | less` — pretty-printed, pageable, no install\n  (`python3 -m json.tool` if `jq` is missing)\n- `jq '.[0]' suspect.meta.json` — the container entry's metadata alone, the\n  usual first look\n- Open it in a browser: Firefox and Chrome render `.json` files as a\n  collapsible tree with search\n- `jless`, `fx`, or `visidata` if installed (see \"Showing the human the\n  evidence\" below)\n\nThe size caution applies to the *agent's* context, not the human's screen.\nNever load the full rmeta JSON into context — a document with a large text\nbody or many attachments makes it enormous, and the conversation only ever\nneeds slices. The saved files also make the session auditable: the evidence\nthe answers came from is on disk, unchanged, re-queryable.\n\n## The forensics config: turn on what default parsing leaves off\n\nThis skill ships `file-forensics-config.json` (in this skill's directory):\none config for every surface, and the named, explicit parse configuration\nfor investigation work. (Its `\"server\": {}` element is required for\ntika-server's `-c` and harmlessly ignored by tika-app; don't remove it.) Use it on\nevery surface, every time — an examination should be able to state exactly\nwhat configuration produced its output, and \"whatever that tool defaults\nto\" is not that. It also makes results identical across surfaces, because\nthe defaults are NOT the same everywhere:\n\n**What it changes per surface:**\n\n- **tika-server, pipes mode, or the library:** the config is the difference\n  between seeing revision history\u002Fmacros and not — none of these switches\n  are on there.\n- **tika-app single-file mode:** the CLI quietly applies its own convenience\n  config (it prints a banner saying so) that already enables the marquee\n  items — `parseIncrementalUpdates`, `extractMacros`, `extractActions`,\n  `extractInlineImages`. On tika-app, `file-forensics-config.json` still adds\n  `extractFontNames`, `extractScripts`, `includeMissingRows`, OneNote page history,\n  deleted\u002Fmoved-content for legacy `.doc` (on `.docx` the convenience\n  config already includes it, so testing this switch on a docx shows no\n  diff — that's expected), and pins `accessCheckMode` to\n  `DONT_CHECK` (tika-app's convenience config sets a more restrictive\n  mode). A bare `tika-app -J` will already show PDF revisions and macros —\n  the config's job there is making that explicit and reproducible rather\n  than unlocking it.\n\nThe full switch list:\n\n- `pdf-parser.parseIncrementalUpdates` — each prior revision of an\n  incrementally-updated PDF is parsed as its own embedded document, so you\n  can read what the file said *before* the last save(s)\n- `pdf-parser.extractActions` — full detail of automatic actions\u002FJavaScript\n- `pdf-parser.extractFontNames` — font inventory (a provenance fingerprint:\n  fonts betray the producing toolchain)\n- `pdf-parser.extractInlineImages` — every image drawn in the PDF becomes\n  an embedded entry: extractable to disk with `-Z`, OCR-able, and part of the\n  inventory. (Repeated images are deduplicated by default —\n  `extractUniqueInlineImagesOnly` — which is usually what you want.)\n- Office (`office-parser` + `ooxml-parser` — set on both;\n  4.x config is per-component): `extractMacros` (macro code as MACRO-typed\n  embedded entries), `includeDeletedContent` and `includeMoveFromContent`\n  (tracked-change deletions and moved-away text in the output),\n  `includeMissingRows` (spreadsheet row gaps)\n- `one-note-parser.includePageHistory` — OneNote text and metadata\n  (authors, timestamps, page GUIDs) include every earlier revision and saved\n  page version, not only each page's current content. Off, earlier authors\n  and dates are absent, as for the final state of an incrementally updated\n  PDF. Exception: `.one` (2010–2016) attachments come out either way,\n  including files only an earlier page version used. In `.one` files saved\n  by OneNote 2010–2016, history is not marked as such; it is mixed in with\n  the current text. In newer (FSSHTTPB) sections each saved page version is\n  its own `\u003Cdiv class=\"page history\">`; edits within a version are merged.\n- `one-note-parser.includeDeletedContent` — newer (FSSHTTPB) OneNote\n  sections still store pages moved to the recycle bin; with this set they\n  come out as `\u003Cdiv class=\"page deleted\">`, each older version as\n  `\u003Cdiv class=\"page deleted history\">` (the text may be only in those).\n- `jsoup-parser.extractScripts` — script bodies in HTML (including HTML\n  email bodies and HTML attachments) become their own `MACRO`-typed embedded\n  entries instead of being silently dropped: JavaScript in a document is\n  something a reviewer should see. Note they do NOT appear in the page's own\n  `tk:content`; look for the extra entries (and the extracted files)\n\nSome defaults are already forensics-friendly and are deliberately NOT\nchanged: overlapping\u002Fduplicate text is kept\n(`suppressDuplicateOverlappingText: false` — text hidden under other text\nstays visible), annotation\u002FAcroForm\u002Fbookmark text is extracted, and\n`accessCheckMode: DONT_CHECK` means Tika extracts regardless of the file's\nclaimed copy\u002Fextract restrictions while still *recording* those claims\nunder `access-permission:*` — the restriction flags are themselves\nevidence.\n\n```bash\njava -jar tika-app.jar --config=file-forensics-config.json -J suspect.file > suspect.rmeta.json\n```\n\nThe config also configures a SHA-256 digester, so `tk:digest:SHA-256`\nappears on every entry on **every** surface — no per-command flag to forget.\n\nIf a parser name doesn't bind on your build, `--list-parser-names` prints\nthe registered names. Expect bigger output and slower parses than default\nconfig — that's the point.\n\n## Identity: is it what it claims to be?\n\n```bash\njava -jar tika-app.jar -d suspect.file    # content-based media type, extension ignored\n```\n\n**Anchor on `tk:content-type-magic-detected`** — what the leading bytes\nsaid, computed by Tika from content alone. The top-level `Content-Type` is\nthe *routing* type, and on tika-server a caller-supplied `Content-Type`\nheader influences it by design — so on the HTTP surface that field can\nreflect upstream input, accidental or adversarial, not just Tika's own\nconclusion. An extension or routed type that disagrees with\n`tk:content-type-magic-detected` is a classic finding (a \"pdf\" that is a\nzip; an \"xlsx\" that is plain-text CSV). Caller-supplied types are tracked\nunder `tk:content-type-hint`, `tk:content-type-override`, and\n`tk:content-type-parser-override` (which of these appears depends on how\nthe type was supplied) — all input, none evidence.\n\n## Provenance claims\n\nThe file's own story about its origin — read it as testimony, not fact:\n\n- `dc:creator` and related Dublin Core fields — claimed author(s)\n- `pdf:docinfo:creator-tool`, `pdf:docinfo:producer` — what claims to have\n  made the PDF (e.g. a phishing PDF \"authored\" by a word processor that\n  doesn't match its claimed corporate origin)\n- `extended-properties:*` (Office) — creating application\u002Fversion, template\n  (`Normal.dotm` = stock Word), total edit time, claimed created\u002Fmodified\n  timestamps\n- **`tk:orig-resource-name`** — for xlsx, the absolute path where the file\n  was last saved (Excel records it in the workbook); on an embedded entry\n  (OLE packages, OneNote attachments and inserted pictures), the path the\n  file had where it was inserted: drive letters, network\n  shares, and `C:\\Users\\\u003Cname>\\...` usernames leak here. (The `tk:` prefix\n  here means Tika surfaced it; the *value* is still the file's own record —\n  treat it as a claim like the rest of this section.)\n\nFindings look like: dates that precede the claimed creating tool's release;\nedit time of 0 on a \"carefully drafted\" document; a template name from an\norganization other than the claimed author's; identical creator strings\nacross supposedly independent documents.\n\n## Revision and tamper signals\n\n- **`pdf:incremental-update-count`** (emitted by default in 4.x) — a PDF\n  above 0 has been modified after its initial write; each increment is a\n  save layered on top of the previous file. Signed-then-modified PDFs show\n  here. `pdf:eof-offsets` lists the byte offset of each revision's end.\n- **Reading the prior versions themselves:** with the forensics config's\n  `parseIncrementalUpdates` on, each earlier revision appears as its own\n  entry in the rmeta array, typed `tk:embedded-resource-type: VERSION`, with\n  `pdf:incremental-update-number` giving its place in history — **0-indexed\n  from the earliest**; the final state is entry 0 of the array and carries\n  no update number. Each VERSION entry is the complete file as it existed at\n  that save (the bytes up to that revision's EOF offset), so its `tk:content`\n  is what the document said *then* — diff a version's content against entry\n  0's to see what changed between saves. The layer structure and content\n  differences are observations; any timestamps inside each revision are that\n  revision's own claims — order is established by the byte layering, timing\n  is not. (Note: the final entry has no\n  `pdf:incremental-update-number` key *at all* — `jq` prints `null` for a\n  missing key and a null value alike, so \"null on entry 0\" is expected, not\n  an error.)\n- `tk:version-count` \u002F `tk:version-number` — the format-general spelling of\n  the same idea (also 0-indexed earliest-first; the latest version carries\n  none). PDFs emit `tk:version-count` alongside the pdf-specific key; other\n  formats that retain prior versions may adopt it, but not all parsers emit\n  these yet.\n- `msoffice:has-track-changes`, `msoffice:has-comments` — content the\n  author may not have meant to ship. Parse output includes tracked-change\n  and comment text; a \"deleted\" tracked change is still in the file.\n- `extended-properties:HiddenSlides` — slides present but not shown.\n- `zip:*` integrity family (zip-based formats): `zip:integrity-check-result`,\n  `zip:duplicate-entry-names`, `zip:local-header-only-entries`,\n  `zip:central-directory-only-entries` — structural anomalies associated\n  with crafted or tampered archives (a duplicate entry name can make two\n  tools see two different \"same\" files).\n\n## Hidden and embedded content\n\nThe rmeta array *is* the embedded-content inventory: every entry past index\n0 is something inside the file — attachments, embedded objects, images,\narchive members, prior VERSIONs — each with its own metadata,\n`tk:embedded-resource-type` (`INLINE`, `ATTACHMENT`, `MACRO`, `METADATA`,\n`THUMBNAIL`, `VERSION`, ...), `tk:embedded-depth`, and path.\n\n**Show the human the literal files.** The metadata inventory is for the\nagent; the extracted bytes are for the person. Phase 1 already extracted\neverything to `evidence\u002Fsuspect-embedded\u002F` (`-Z --extract-dir=...`, or\n`\u002Funpack` on the server) so they can open the images, hand an attachment\nto another tool, or open a prior PDF revision side-by-side with the final.\nIf that step was skipped, do it now — an examination without the extracted\nfiles is incomplete.\n\n- With the forensics config, this includes **macro source** (MACRO entries)\n  and **each prior PDF revision as a standalone, openable PDF** (VERSION\n  entries).\n- **Read code from the extracted files, not from `tk:content`.** The default\n  content handler is Markdown, which escapes underscores and other\n  characters — VBA\u002Fscript source read via `jq '.[N].\"tk:content\"'` comes\n  back visually corrupted (`VB\\_Name`). The `-z`\u002F`-Z` extracted files are\n  pristine bytes. (Alternative: capture with `-J -t` for unescaped plain\n  text per entry.)\n- Extracted files are **renumbered** (`1.jpg`, `2.pdf`, ...); each\n  `datapackage.json` resource carries the original name (`tk:resource-name`)\n  and `tk:embedded-id`, the key to the file's row in `rmeta.json`.\n- The output is a Frictionless data package (Tika 4.2+): for a single input\n  file the extract dir is the package — files under `unpacked\u002F`, and\n  `datapackage.json` already carries a SHA-256 per file (and for\n  `rmeta.json`). Digest what you extracted\n  (`sha256sum evidence\u002Fsuspect-embedded\u002Funpacked\u002F*`) and check it against the\n  manifest, so each artifact is pinned the same way the container file is.\n- Mechanics and gotchas (Pipes-mode delay, chatty stderr) are in\n  `file-to-markdown`; the server-side equivalent is `\u002Funpack`, which returns\n  the same package as one zip over HTTP, laid out the same way. Against the\n  server started above (forensics config loaded):\n\n  ```bash\n  curl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Funpack > suspect-embedded.zip\n  mkdir -p evidence\u002Fsuspect-embedded && unzip -q suspect-embedded.zip -d evidence\u002Fsuspect-embedded\n  sha256sum evidence\u002Fsuspect-embedded\u002Funpacked\u002F*\n  ```\n\n  `\u002Funpack\u002Fall` also includes the container's own text and metadata. Both\n  are `PUT`; `POST multipart\u002Fform-data` takes a per-request `config` part.\n\n**Macros:** Office macro code is surfaced as embedded entries typed `MACRO`,\nbut only when macro extraction is enabled — it is **off by default**;\n`file-forensics-config.json` (above) turns it on. Read the extracted VBA as\ntext. Presence of macros is a data point, not a verdict —\nplenty of legitimate spreadsheets have them.\n\n## Risk indicators\n\n- `pdf:action-triggers`, `pdf:action-types`, `pdf:js-name` — automatic\n  actions and JavaScript wired into a PDF (open actions are a common\n  malicious-document mechanism, and also used legitimately by forms). With\n  the forensics config's `extractActions`, **each JavaScript body is its\n  own embedded entry**: `tk:embedded-resource-type: MACRO`, `Content-Type:\n  text\u002Fjavascript`, `pdf:action-trigger` naming what fires it\n  (`PAGE_OPEN`, ...), and the code in `tk:content` — and `-Z` writes it to\n  disk as a file. A one-page PDF with no text and a `PAGE_OPEN` script is\n  the classic shape; `demo\u002Finvoice.pdf` is one.\n- `pdf:has-xfa`, `pdf:has-acro-form-fields` — active form machinery\n- `tk:encrypted` — the file (or an embedded item) is encrypted; content\n  Tika couldn't read is content nobody scanned\n- `tk:exception:*` — parse failures, per embedded item; a file that\n  crashes parsers is itself a signal worth recording\n\n## Signatures — presence, not validity\n\n`pdf:has-signature-fields` and the `tk:signature:*` family (`name`, `date`,\n`reason`, `location`, `contact-info`, `filter`) report that signature\nstructures exist and what they claim. **Tika does not cryptographically\nvalidate signatures** — a well-formed `tk:signature:name` proves only that\nsignature metadata is present, not that it verifies, and\n`pdf:incremental-update-count` > 0 alongside a signature means the file\nchanged after some revision was signed. Use a signature-validation tool for\nvalidity; use Tika to know there's something to validate.\n\n## Digests: pin down what you examined\n\n```bash\njava -jar tika-app.jar --digest=sha256 -j suspect.file\n# adds tk:digest:SHA-256 to the metadata\n```\n\nRecord the digest alongside findings so they're tied to exact bytes —\nmalware family lookups, dedup across an evidence set, and \"is this the same\nfile I looked at yesterday\" all start here. (`md5`, `sha1`, `sha384`,\n`sha512` also available; SHA3 requires configuring the BouncyCastle digester\nin a JSON config.)\n\n## Demo files\n\nThe `demo\u002F` directory in this skill ships six small real files with real\nfindings — a PDF with revision history, a macro-bearing Word document, a docx with\nembedded content, an xlsx whose metadata records the absolute path where\nit was last saved, a text-free PDF with a page-open JavaScript action, and\nan HTML page with an embedded script — plus a README of suggested questions. They're\nfor showing a human what this skill does on files where the default parse\nlooks unremarkable, and for smoke-testing your setup end-to-end.\n\n## Showing the human the evidence\n\nTerminal `jq` quotes are fine for single answers; for \"walk me through what\nyou found,\" give the human something browsable:\n\n- If an interactive JSON viewer is installed, use it: `jless\n  suspect.meta.json` or `fx`, or `visidata` (the rmeta array is naturally\n  tabular — rows are entries, columns are keys).\n- **Better: generate a report.** (Run the embedded-file extraction first if\n  the report will link to extracted items.) Write a self-contained static\n  HTML file next to the evidence — summary and digests up top, a claims-vs-observations\n  table per entry, a collapsible `\u003Cdetails>` section per embedded item,\n  relative links to the extracted files — and open it in the browser. No\n  server, no dependencies, everything embedded (a page that phones out is\n  not an evidence artifact). Regenerate it as the investigation deepens; it\n  doubles as the deliverable the human keeps.\n- If your agent host supports publishing pages\u002Fartifacts, that can make the\n  report nicely viewable — **but read this first: publishing uploads the\n  evidence to an external service.** Document content, metadata, extracted\n  file names and paths leave the machine; anything shared can be forwarded,\n  cached, or indexed beyond your control, and \"deleted\" rarely means gone.\n  For anything sensitive — client documents, case material, unreleased\n  content, anything under privilege or NDA — keep the report as a local\n  HTML file and do not publish it. Publish only when the human has\n  explicitly confirmed the content is safe to leave the machine.\n\n## Evidence discipline\n\n- Work on a copy; mount read-only in Docker. Tika doesn't modify inputs,\n  but the discipline should not depend on that.\n- Save the full rmeta JSON per file and record the exact command and Tika\n  version (`--version`) with it — findings should be reproducible.\n- Report inconsistencies as inconsistencies (\"claimed creation 2019, claimed\n  creator tool released 2021\"), not conclusions (\"forged\").\n- This is content analysis, not chain-of-custody forensics: no write\n  blocking, no acquisition hashing, no court-grade custody trail. For\n  matters likely to face legal scrutiny, treat Tika as the analysis layer\n  inside a proper forensic process, not the process.\n","\u003C!--\nLicensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements.  See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the \"License\"); you may not use this file except in compliance with\nthe License.  You may obtain a copy of the License at\n\n    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\nLocal override: `$TIKA_SKILLS_LOCAL\u002Ffile-forensics\u002FLOCAL.md` (default `~\u002F.tika-skills`),\nread after this file, wins on conflict.\n\n# File forensics with Apache Tika\n\n**What this can and cannot tell you.** Tika cannot tell you who wrote a\nfile. It can tell you — exhaustively — what the file *claims* about itself\nand what it actually *contains*, and those claims are the evidence: a\n`dc:creator` value is an assertion some software recorded, not an identity;\na template-default author, an inconsistency between claimed dates, or a\nconspicuously *missing* field is as much a finding as a present one. Report\nwhat the file says; let the human draw conclusions.\n\n**The one rule for reading Tika's output:** the key prefix tells you *who is\nasserting each fact*.\n\n- **`tk:*`** — Tika's own parse-time observations, which the file cannot\n  forge into place: magic-byte-detected type, embedded-item structure,\n  encryption status, digests of the actual bytes.\n- **Everything else** (`dc:`, `pdf:docinfo:`, `extended-properties:`,\n  `xmp:`, ...) — the file's claims about itself, recorded by whatever\n  software touched it, editable by anyone with a hex editor.\n\nDisagreement between the two classes is where findings live.\n\n**And one rule with no exceptions: no date in a file is an observation.**\nCreation, modification, and print timestamps — including the per-revision\ntimestamps inside PDF incremental updates — are written by software under\nthe control of whoever produced the file, and can be set to anything. Tika\ncan observe that a revision layer *exists*, how large it is, and what it\n*contains*; when it was written is only ever claimed. Report timestamps as\n\"the file records...\", never \"this happened at...\".\n\nSetup (getting tika-app or a tika-server) is covered by the\n`file-to-markdown` companion skill; this skill assumes one is available and\nuses the same invocation shapes. **Parse suspect files in isolation — this\nis not optional for forensics work.** tika-server and `tika-app -f` both\nparse in crash-isolated forked processes; for hostile-file triage prefer the\nDocker route with the input mounted read-only (see `file-to-markdown-docker`)\nso the parse can neither modify the evidence nor touch anything else.\n\nThe one-command forensics rig — the stock Tika image started with this\nskill's config (which IS the unlock on the server surface: none of these\nswitches are on by default there):\n\n```bash\ndocker run -d --rm --name tika-forensics -p 127.0.0.1:9998:9998 \\\n  -v \"$(pwd)\u002Ffile-forensics-config.json:\u002Ffile-forensics-config.json:ro\" \\\n  apache\u002Ftika:latest-full -c \u002Ffile-forensics-config.json\ncurl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Frmeta > suspect.rmeta.json\ndocker stop tika-forensics   # when done\n```\n\nGuaranteed OCR, read-only config, process isolation, explicit named\nconfiguration — in one command.\n\n## Workflow: capture once, then converse over the JSON\n\nThis skill is **not** \"run Tika and read the output into context.\" It's two\nphases:\n\n**Phase 1 — capture** (once per file): parse to disk with a digest,\n**extract every embedded file to disk**, and make a compact metadata-only\nview for the conversation:\n\n```bash\njava -jar tika-app.jar --config=file-forensics-config.json -J suspect.file > suspect.rmeta.json\njava -jar tika-app.jar --config=file-forensics-config.json -Z --extract-dir=evidence\u002Fsuspect-embedded suspect.file\n# (--digest=sha256 is only needed if you are NOT using the config;\n#  the config's built-in digester already covers it)\n# or, against the docker rig from the isolation section above:\n# curl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Frmeta > suspect.rmeta.json\n# curl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Funpack > suspect-embedded.zip\n# mkdir -p evidence\u002Fsuspect-embedded && unzip -q suspect-embedded.zip -d evidence\u002Fsuspect-embedded\n\njq 'map(del(.\"tk:content\"))' suspect.rmeta.json > suspect.meta.json\nls -lR evidence\u002Fsuspect-embedded && sha256sum evidence\u002Fsuspect-embedded\u002Funpacked\u002F*\n```\n\n`suspect.rmeta.json` is the full evidence record — a JSON array where entry\n0 is the file and entries 1+ are everything embedded in it, content\nincluded. `suspect.meta.json` is the same array with the (possibly huge)\nextracted text stripped out: small enough to inspect freely.\n`evidence\u002Fsuspect-embedded\u002F` holds **the literal embedded files** —\nattachments, images, macro source, each prior PDF revision as an openable\nPDF — and the examiner needs those, not descriptions of them. Extraction\nis part of capture, not a follow-up; tell the human where the directory is\nand what's in it as soon as it exists.\n\n**Phase 2 — investigate conversationally.** Each question the user asks\nbecomes a targeted query against the saved files, and only the answering\nvalues enter the conversation:\n\n```bash\njq 'length' suspect.meta.json                          # how many embedded items?\njq '.[0] | keys' suspect.meta.json                      # what fields exist at all?\njq '.[].[\"tk:embedded-resource-type\"]' suspect.meta.json\njq '.[0].\"pdf:incremental-update-count\"' suspect.meta.json\ngrep -o 'Normal.dotm' suspect.meta.json                 # quick claim checks\njq '.[2].\"tk:content\"' suspect.rmeta.json               # content of ONE entry,\n                                                        # only when asked\n```\n\nTwo queries worth running early on any file:\n\n```bash\n# inventory: one line per entry -- index, depth, type, name, content-type\njq -r 'to_entries[] | [.key, .value.\"tk:embedded-depth\", .value.\"tk:embedded-resource-type\",\n       .value.\"tk:resource-name\", .value.\"Content-Type\"] | @tsv' suspect.meta.json\n# every key that appears anywhere in the array -- what there is to ask about\njq '[.[] | keys[]] | unique' suspect.meta.json\n```\n\n**When the human wants to see everything**, they get three things: the\nextracted-files directory (open the images, the attachments, the prior\nrevisions — with whatever tools they normally use), and both JSON files:\n`suspect.rmeta.json` is the complete record, content included;\n`suspect.meta.json` is the same thing without the text, which is what you\nwant when the text runs to megabytes and drowns the metadata in a viewer.\nPoint them at whatever is already on the machine:\n\n- `jq . suspect.rmeta.json | less` — pretty-printed, pageable, no install\n  (`python3 -m json.tool` if `jq` is missing)\n- `jq '.[0]' suspect.meta.json` — the container entry's metadata alone, the\n  usual first look\n- Open it in a browser: Firefox and Chrome render `.json` files as a\n  collapsible tree with search\n- `jless`, `fx`, or `visidata` if installed (see \"Showing the human the\n  evidence\" below)\n\nThe size caution applies to the *agent's* context, not the human's screen.\nNever load the full rmeta JSON into context — a document with a large text\nbody or many attachments makes it enormous, and the conversation only ever\nneeds slices. The saved files also make the session auditable: the evidence\nthe answers came from is on disk, unchanged, re-queryable.\n\n## The forensics config: turn on what default parsing leaves off\n\nThis skill ships `file-forensics-config.json` (in this skill's directory):\none config for every surface, and the named, explicit parse configuration\nfor investigation work. (Its `\"server\": {}` element is required for\ntika-server's `-c` and harmlessly ignored by tika-app; don't remove it.) Use it on\nevery surface, every time — an examination should be able to state exactly\nwhat configuration produced its output, and \"whatever that tool defaults\nto\" is not that. It also makes results identical across surfaces, because\nthe defaults are NOT the same everywhere:\n\n**What it changes per surface:**\n\n- **tika-server, pipes mode, or the library:** the config is the difference\n  between seeing revision history\u002Fmacros and not — none of these switches\n  are on there.\n- **tika-app single-file mode:** the CLI quietly applies its own convenience\n  config (it prints a banner saying so) that already enables the marquee\n  items — `parseIncrementalUpdates`, `extractMacros`, `extractActions`,\n  `extractInlineImages`. On tika-app, `file-forensics-config.json` still adds\n  `extractFontNames`, `extractScripts`, `includeMissingRows`, OneNote page history,\n  deleted\u002Fmoved-content for legacy `.doc` (on `.docx` the convenience\n  config already includes it, so testing this switch on a docx shows no\n  diff — that's expected), and pins `accessCheckMode` to\n  `DONT_CHECK` (tika-app's convenience config sets a more restrictive\n  mode). A bare `tika-app -J` will already show PDF revisions and macros —\n  the config's job there is making that explicit and reproducible rather\n  than unlocking it.\n\nThe full switch list:\n\n- `pdf-parser.parseIncrementalUpdates` — each prior revision of an\n  incrementally-updated PDF is parsed as its own embedded document, so you\n  can read what the file said *before* the last save(s)\n- `pdf-parser.extractActions` — full detail of automatic actions\u002FJavaScript\n- `pdf-parser.extractFontNames` — font inventory (a provenance fingerprint:\n  fonts betray the producing toolchain)\n- `pdf-parser.extractInlineImages` — every image drawn in the PDF becomes\n  an embedded entry: extractable to disk with `-Z`, OCR-able, and part of the\n  inventory. (Repeated images are deduplicated by default —\n  `extractUniqueInlineImagesOnly` — which is usually what you want.)\n- Office (`office-parser` + `ooxml-parser` — set on both;\n  4.x config is per-component): `extractMacros` (macro code as MACRO-typed\n  embedded entries), `includeDeletedContent` and `includeMoveFromContent`\n  (tracked-change deletions and moved-away text in the output),\n  `includeMissingRows` (spreadsheet row gaps)\n- `one-note-parser.includePageHistory` — OneNote text and metadata\n  (authors, timestamps, page GUIDs) include every earlier revision and saved\n  page version, not only each page's current content. Off, earlier authors\n  and dates are absent, as for the final state of an incrementally updated\n  PDF. Exception: `.one` (2010–2016) attachments come out either way,\n  including files only an earlier page version used. In `.one` files saved\n  by OneNote 2010–2016, history is not marked as such; it is mixed in with\n  the current text. In newer (FSSHTTPB) sections each saved page version is\n  its own `\u003Cdiv class=\"page history\">`; edits within a version are merged.\n- `one-note-parser.includeDeletedContent` — newer (FSSHTTPB) OneNote\n  sections still store pages moved to the recycle bin; with this set they\n  come out as `\u003Cdiv class=\"page deleted\">`, each older version as\n  `\u003Cdiv class=\"page deleted history\">` (the text may be only in those).\n- `jsoup-parser.extractScripts` — script bodies in HTML (including HTML\n  email bodies and HTML attachments) become their own `MACRO`-typed embedded\n  entries instead of being silently dropped: JavaScript in a document is\n  something a reviewer should see. Note they do NOT appear in the page's own\n  `tk:content`; look for the extra entries (and the extracted files)\n\nSome defaults are already forensics-friendly and are deliberately NOT\nchanged: overlapping\u002Fduplicate text is kept\n(`suppressDuplicateOverlappingText: false` — text hidden under other text\nstays visible), annotation\u002FAcroForm\u002Fbookmark text is extracted, and\n`accessCheckMode: DONT_CHECK` means Tika extracts regardless of the file's\nclaimed copy\u002Fextract restrictions while still *recording* those claims\nunder `access-permission:*` — the restriction flags are themselves\nevidence.\n\n```bash\njava -jar tika-app.jar --config=file-forensics-config.json -J suspect.file > suspect.rmeta.json\n```\n\nThe config also configures a SHA-256 digester, so `tk:digest:SHA-256`\nappears on every entry on **every** surface — no per-command flag to forget.\n\nIf a parser name doesn't bind on your build, `--list-parser-names` prints\nthe registered names. Expect bigger output and slower parses than default\nconfig — that's the point.\n\n## Identity: is it what it claims to be?\n\n```bash\njava -jar tika-app.jar -d suspect.file    # content-based media type, extension ignored\n```\n\n**Anchor on `tk:content-type-magic-detected`** — what the leading bytes\nsaid, computed by Tika from content alone. The top-level `Content-Type` is\nthe *routing* type, and on tika-server a caller-supplied `Content-Type`\nheader influences it by design — so on the HTTP surface that field can\nreflect upstream input, accidental or adversarial, not just Tika's own\nconclusion. An extension or routed type that disagrees with\n`tk:content-type-magic-detected` is a classic finding (a \"pdf\" that is a\nzip; an \"xlsx\" that is plain-text CSV). Caller-supplied types are tracked\nunder `tk:content-type-hint`, `tk:content-type-override`, and\n`tk:content-type-parser-override` (which of these appears depends on how\nthe type was supplied) — all input, none evidence.\n\n## Provenance claims\n\nThe file's own story about its origin — read it as testimony, not fact:\n\n- `dc:creator` and related Dublin Core fields — claimed author(s)\n- `pdf:docinfo:creator-tool`, `pdf:docinfo:producer` — what claims to have\n  made the PDF (e.g. a phishing PDF \"authored\" by a word processor that\n  doesn't match its claimed corporate origin)\n- `extended-properties:*` (Office) — creating application\u002Fversion, template\n  (`Normal.dotm` = stock Word), total edit time, claimed created\u002Fmodified\n  timestamps\n- **`tk:orig-resource-name`** — for xlsx, the absolute path where the file\n  was last saved (Excel records it in the workbook); on an embedded entry\n  (OLE packages, OneNote attachments and inserted pictures), the path the\n  file had where it was inserted: drive letters, network\n  shares, and `C:\\Users\\\u003Cname>\\...` usernames leak here. (The `tk:` prefix\n  here means Tika surfaced it; the *value* is still the file's own record —\n  treat it as a claim like the rest of this section.)\n\nFindings look like: dates that precede the claimed creating tool's release;\nedit time of 0 on a \"carefully drafted\" document; a template name from an\norganization other than the claimed author's; identical creator strings\nacross supposedly independent documents.\n\n## Revision and tamper signals\n\n- **`pdf:incremental-update-count`** (emitted by default in 4.x) — a PDF\n  above 0 has been modified after its initial write; each increment is a\n  save layered on top of the previous file. Signed-then-modified PDFs show\n  here. `pdf:eof-offsets` lists the byte offset of each revision's end.\n- **Reading the prior versions themselves:** with the forensics config's\n  `parseIncrementalUpdates` on, each earlier revision appears as its own\n  entry in the rmeta array, typed `tk:embedded-resource-type: VERSION`, with\n  `pdf:incremental-update-number` giving its place in history — **0-indexed\n  from the earliest**; the final state is entry 0 of the array and carries\n  no update number. Each VERSION entry is the complete file as it existed at\n  that save (the bytes up to that revision's EOF offset), so its `tk:content`\n  is what the document said *then* — diff a version's content against entry\n  0's to see what changed between saves. The layer structure and content\n  differences are observations; any timestamps inside each revision are that\n  revision's own claims — order is established by the byte layering, timing\n  is not. (Note: the final entry has no\n  `pdf:incremental-update-number` key *at all* — `jq` prints `null` for a\n  missing key and a null value alike, so \"null on entry 0\" is expected, not\n  an error.)\n- `tk:version-count` \u002F `tk:version-number` — the format-general spelling of\n  the same idea (also 0-indexed earliest-first; the latest version carries\n  none). PDFs emit `tk:version-count` alongside the pdf-specific key; other\n  formats that retain prior versions may adopt it, but not all parsers emit\n  these yet.\n- `msoffice:has-track-changes`, `msoffice:has-comments` — content the\n  author may not have meant to ship. Parse output includes tracked-change\n  and comment text; a \"deleted\" tracked change is still in the file.\n- `extended-properties:HiddenSlides` — slides present but not shown.\n- `zip:*` integrity family (zip-based formats): `zip:integrity-check-result`,\n  `zip:duplicate-entry-names`, `zip:local-header-only-entries`,\n  `zip:central-directory-only-entries` — structural anomalies associated\n  with crafted or tampered archives (a duplicate entry name can make two\n  tools see two different \"same\" files).\n\n## Hidden and embedded content\n\nThe rmeta array *is* the embedded-content inventory: every entry past index\n0 is something inside the file — attachments, embedded objects, images,\narchive members, prior VERSIONs — each with its own metadata,\n`tk:embedded-resource-type` (`INLINE`, `ATTACHMENT`, `MACRO`, `METADATA`,\n`THUMBNAIL`, `VERSION`, ...), `tk:embedded-depth`, and path.\n\n**Show the human the literal files.** The metadata inventory is for the\nagent; the extracted bytes are for the person. Phase 1 already extracted\neverything to `evidence\u002Fsuspect-embedded\u002F` (`-Z --extract-dir=...`, or\n`\u002Funpack` on the server) so they can open the images, hand an attachment\nto another tool, or open a prior PDF revision side-by-side with the final.\nIf that step was skipped, do it now — an examination without the extracted\nfiles is incomplete.\n\n- With the forensics config, this includes **macro source** (MACRO entries)\n  and **each prior PDF revision as a standalone, openable PDF** (VERSION\n  entries).\n- **Read code from the extracted files, not from `tk:content`.** The default\n  content handler is Markdown, which escapes underscores and other\n  characters — VBA\u002Fscript source read via `jq '.[N].\"tk:content\"'` comes\n  back visually corrupted (`VB\\_Name`). The `-z`\u002F`-Z` extracted files are\n  pristine bytes. (Alternative: capture with `-J -t` for unescaped plain\n  text per entry.)\n- Extracted files are **renumbered** (`1.jpg`, `2.pdf`, ...); each\n  `datapackage.json` resource carries the original name (`tk:resource-name`)\n  and `tk:embedded-id`, the key to the file's row in `rmeta.json`.\n- The output is a Frictionless data package (Tika 4.2+): for a single input\n  file the extract dir is the package — files under `unpacked\u002F`, and\n  `datapackage.json` already carries a SHA-256 per file (and for\n  `rmeta.json`). Digest what you extracted\n  (`sha256sum evidence\u002Fsuspect-embedded\u002Funpacked\u002F*`) and check it against the\n  manifest, so each artifact is pinned the same way the container file is.\n- Mechanics and gotchas (Pipes-mode delay, chatty stderr) are in\n  `file-to-markdown`; the server-side equivalent is `\u002Funpack`, which returns\n  the same package as one zip over HTTP, laid out the same way. Against the\n  server started above (forensics config loaded):\n\n  ```bash\n  curl -T suspect.file http:\u002F\u002Flocalhost:9998\u002Funpack > suspect-embedded.zip\n  mkdir -p evidence\u002Fsuspect-embedded && unzip -q suspect-embedded.zip -d evidence\u002Fsuspect-embedded\n  sha256sum evidence\u002Fsuspect-embedded\u002Funpacked\u002F*\n  ```\n\n  `\u002Funpack\u002Fall` also includes the container's own text and metadata. Both\n  are `PUT`; `POST multipart\u002Fform-data` takes a per-request `config` part.\n\n**Macros:** Office macro code is surfaced as embedded entries typed `MACRO`,\nbut only when macro extraction is enabled — it is **off by default**;\n`file-forensics-config.json` (above) turns it on. Read the extracted VBA as\ntext. Presence of macros is a data point, not a verdict —\nplenty of legitimate spreadsheets have them.\n\n## Risk indicators\n\n- `pdf:action-triggers`, `pdf:action-types`, `pdf:js-name` — automatic\n  actions and JavaScript wired into a PDF (open actions are a common\n  malicious-document mechanism, and also used legitimately by forms). With\n  the forensics config's `extractActions`, **each JavaScript body is its\n  own embedded entry**: `tk:embedded-resource-type: MACRO`, `Content-Type:\n  text\u002Fjavascript`, `pdf:action-trigger` naming what fires it\n  (`PAGE_OPEN`, ...), and the code in `tk:content` — and `-Z` writes it to\n  disk as a file. A one-page PDF with no text and a `PAGE_OPEN` script is\n  the classic shape; `demo\u002Finvoice.pdf` is one.\n- `pdf:has-xfa`, `pdf:has-acro-form-fields` — active form machinery\n- `tk:encrypted` — the file (or an embedded item) is encrypted; content\n  Tika couldn't read is content nobody scanned\n- `tk:exception:*` — parse failures, per embedded item; a file that\n  crashes parsers is itself a signal worth recording\n\n## Signatures — presence, not validity\n\n`pdf:has-signature-fields` and the `tk:signature:*` family (`name`, `date`,\n`reason`, `location`, `contact-info`, `filter`) report that signature\nstructures exist and what they claim. **Tika does not cryptographically\nvalidate signatures** — a well-formed `tk:signature:name` proves only that\nsignature metadata is present, not that it verifies, and\n`pdf:incremental-update-count` > 0 alongside a signature means the file\nchanged after some revision was signed. Use a signature-validation tool for\nvalidity; use Tika to know there's something to validate.\n\n## Digests: pin down what you examined\n\n```bash\njava -jar tika-app.jar --digest=sha256 -j suspect.file\n# adds tk:digest:SHA-256 to the metadata\n```\n\nRecord the digest alongside findings so they're tied to exact bytes —\nmalware family lookups, dedup across an evidence set, and \"is this the same\nfile I looked at yesterday\" all start here. (`md5`, `sha1`, `sha384`,\n`sha512` also available; SHA3 requires configuring the BouncyCastle digester\nin a JSON config.)\n\n## Demo files\n\nThe `demo\u002F` directory in this skill ships six small real files with real\nfindings — a PDF with revision history, a macro-bearing Word document, a docx with\nembedded content, an xlsx whose metadata records the absolute path where\nit was last saved, a text-free PDF with a page-open JavaScript action, and\nan HTML page with an embedded script — plus a README of suggested questions. They're\nfor showing a human what this skill does on files where the default parse\nlooks unremarkable, and for smoke-testing your setup end-to-end.\n\n## Showing the human the evidence\n\nTerminal `jq` quotes are fine for single answers; for \"walk me through what\nyou found,\" give the human something browsable:\n\n- If an interactive JSON viewer is installed, use it: `jless\n  suspect.meta.json` or `fx`, or `visidata` (the rmeta array is naturally\n  tabular — rows are entries, columns are keys).\n- **Better: generate a report.** (Run the embedded-file extraction first if\n  the report will link to extracted items.) Write a self-contained static\n  HTML file next to the evidence — summary and digests up top, a claims-vs-observations\n  table per entry, a collapsible `\u003Cdetails>` section per embedded item,\n  relative links to the extracted files — and open it in the browser. No\n  server, no dependencies, everything embedded (a page that phones out is\n  not an evidence artifact). Regenerate it as the investigation deepens; it\n  doubles as the deliverable the human keeps.\n- If your agent host supports publishing pages\u002Fartifacts, that can make the\n  report nicely viewable — **but read this first: publishing uploads the\n  evidence to an external service.** Document content, metadata, extracted\n  file names and paths leave the machine; anything shared can be forwarded,\n  cached, or indexed beyond your control, and \"deleted\" rarely means gone.\n  For anything sensitive — client documents, case material, unreleased\n  content, anything under privilege or NDA — keep the report as a local\n  HTML file and do not publish it. Publish only when the human has\n  explicitly confirmed the content is safe to leave the machine.\n\n## Evidence discipline\n\n- Work on a copy; mount read-only in Docker. Tika doesn't modify inputs,\n  but the discipline should not depend on that.\n- Save the full rmeta JSON per file and record the exact command and Tika\n  version (`--version`) with it — findings should be reproducible.\n- Report inconsistencies as inconsistencies (\"claimed creation 2019, claimed\n  creator tool released 2021\"), not conclusions (\"forged\").\n- This is content analysis, not chain-of-custody forensics: no write\n  blocking, no acquisition hashing, no court-grade custody trail. For\n  matters likely to face legal scrutiny, treat Tika as the analysis layer\n  inside a proper forensic process, not the process.\n",{"name":5,"description":7},"main","eedcbd14a72f536f8bc1ef3d669037540a2cc196",".skills\u002Fusers\u002Ffile-forensics",1039,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika","https:\u002F\u002Ftika.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-13 08:35:47",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add apache\u002Ftika --skill file-forensics",{"tool":67,"command":68},"bunx","bunx skills add apache\u002Ftika --skill file-forensics",{"tool":70,"command":71},"pnpm","pnpm dlx skills add apache\u002Ftika --skill file-forensics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002FSKILL.md",true,[75,81,85,89,93,99,105,109],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"demo\u002Fbudget.xlsx","ASSET","资产文件",8396,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Fdemo\u002Fbudget.xlsx",{"path":82,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":83,"sourceHtmlUrl":84},"demo\u002Fcontract.pdf",64872,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Fdemo\u002Fcontract.pdf",{"path":86,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":87,"sourceHtmlUrl":88},"demo\u002Finvoice.pdf",456,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Fdemo\u002Finvoice.pdf",{"path":90,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":91,"sourceHtmlUrl":92},"demo\u002Fmemo.docx",52399,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Fdemo\u002Fmemo.docx",{"path":94,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"demo\u002Fnewsletter.html","REFERENCE","参考文档",202,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Fdemo\u002Fnewsletter.html",{"path":100,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":103,"sourceHtmlUrl":104},"demo\u002Fquarterly-report.docm","OTHER","其他",17322,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Fdemo\u002Fquarterly-report.docm",{"path":106,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":107,"sourceHtmlUrl":108},"demo\u002FREADME.md",1591,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Fdemo\u002FREADME.md",{"path":110,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":111,"sourceHtmlUrl":112},"file-forensics-config.json",988,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002Ffile-forensics-config.json",[114,148,174,201,226,241],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":127,"publishedAt":47},"01M6ACFKZR081Z7QX5XB1ZA2R2","file-to-markdown","Turn almost any file into Markdown plus metadata — PDF, Office, HTML, email, archives, images, audio\u002Fvideo, 1000+ formats — powered by Apache Tika, either via the tika-app CLI (zero setup, one file) or a running tika-server (curl, warm process, many calls). Leads with rmeta (structured, embedded-item-aware output) as the default operation rather than flat concatenated text, since you can't tell whether a file has embedded content from its extension. Covers metadata-only triage, type and language detection, OCR, and output-size discipline for agent context. Use whenever a task involves reading the content of a file whose format you don't want to hand-parse.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-to-markdown\u002FSKILL.md",[120,121,124],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":122,"categoryName":123,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[128,24,129,44,130,131,132,9,42,133,40,134,135,136,137,138,139,140,141,142,143,144,145,146,147],"file to markdown","markdown","cli","triage","setup","metadata","server","ocr","Video","Audio","text","discipline","only","images","default","either","app","you","hand","parse",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":158,"publishedAt":47},"01M6ACFHJR3612ZE6RNX1P5WG9","file-to-markdown-docker","Run Apache Tika as a Docker container when you need guaranteed OCR (scanned PDFs, images) or geospatial raster support with zero local install — `apache\u002Ftika:\u003Cversion>-full` bundles Tesseract, GDAL, ImageMagick, and fonts. Also covers the minimal image, port\u002Fvolume\u002Fmemory conventions, the path-identity mount gotcha, and how to confirm OCR actually ran rather than silently returning no text. Powered by Apache Tika. Use when a local `tika-app`\u002F`tika-server` doesn't have Tesseract installed, or you want a disposable, self-contained parsing environment. Companion to the `file-to-markdown` skill, which covers the parsing calls themselves once a server is up.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-to-markdown-docker\u002FSKILL.md",[154,155],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",[159,160,128,24,129,161,162,163,164,165,9,40,135,138,166,141,167,168,169,144,170,145,171,172,173],"docker","file to markdown docker","image","memory","support","identity","run","up","self","volume","local","how to","fonts","which","when",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":47},"01M6ACFB92SPADF0FY4490B847","update-site-for-release","Update\u002Fpublish the Apache Tika website (tika-site SVN repo) for a release — step 17 of the Release Process. Handles the 4.x track (Changes page + aggregate javadoc + Antora docs branch) vs the 3.x maintenance track (full per-version apt docs + javadoc). Use for \"update the site\", \"publish the site for X.Y.Z\", \"the website part of the release\".","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Fupdate-site-for-release\u002FSKILL.md",[],[181,182,183,184,185,186,187,9,40,188,189,190,191,192,193,194,195,196,197,198,199,200],"update","release","update site for release","site","for","docs","release process","website","apt","publish","page","branch","repo","use","version","maintenance","full","svn","changes","track",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":213,"publishedAt":47},"01M6ACF9G52NYHXQ0BVSJ3VH6E","tika-eval-h2-query","Query the tika-eval H2 database directly for counts and joins the canned reports do not compute — connection gotchas, key tables, example queries. Use when the xlsx\u002Fsummary.md reports are not enough.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Ftika-eval-h2-query\u002FSKILL.md",[207,210],{"categoryNo":208,"categoryName":209,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000004","电子表格",{"categoryNo":211,"categoryName":212,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",[40,214,215,216,217,218,194,219,35,220,221,222,223,224,225,185,173],"tika eval h2 query","eval","query","xlsx","database","example","queries","do","summary","compute","connection","tables",{"skillNo":227,"name":228,"nameZh":6,"description":229,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":230,"categories":231,"keywords":232,"publishedAt":47},"01M6ACF7V56CCWHNVR614VBNX5","tika-eval-encoding-regression","Condensed tika-eval pattern for charset-detector regression hunts (\"A picks encoding X, B picks Y\") using one build and two configs — encoding-pair flip queries, OOV\u002Flanguageness\u002FFFFD signals, per-file detector attribution.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Ftika-eval-encoding-regression\u002FSKILL.md",[],[40,233,234,235,215,24,236,237,220,238,239,33,240,185],"tika eval encoding regression","encoding","regression","attribution","pair","build","pattern","detector",{"skillNo":242,"name":243,"nameZh":6,"description":244,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":245,"categories":246,"keywords":247,"publishedAt":47},"01M6ACF53J5MJCDNAEMCBV0RPP","tika-eval-compare","Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for \"compare before\u002Fafter extracts\", \"eval this change against the corpus\".","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Ftika-eval-compare\u002FSKILL.md",[],[40,248,215,249,250,42,234,194,251,252,253,185],"tika eval compare","compare","change","embedded","document","detect"]