manor-os/manor-ai/file-engine
Claude Code and agent skill by manor-os/manor-ai
- community
Checking that the SKILL.md file is still in the repository.
Create, convert (including DOCX to PDF), patch, and replace Knowledge files through one file-engine workflow.
Install
npx vskill@latest install manor-os/manor-ai/file-engineSKILL.md
File Engine
Use this skill when the user asks to create, update, or AI-edit a Knowledge file and no more specific file-type skill has already taken over.
Workflow
- Use
inspect_file_enginewhen you are unsure whether a file type supports patching. - Use
search_documentsorlist_documentsto resolve the user-visible Knowledge file. - Use
read_filewith the resolvedfs_pathbefore editing. Keep itssource_sha256(the exact file-byte hash, including formatting). Passinclude_structure=trueto obtain DOCX paragraph/table indices, PPTX slide/shape IDs and first-master layout indices, or Excel sheet/table/column names. Never guess selectors; if the bounded structure result is truncated, do not assume omitted items are absent. - Use
generate_filewhen creating a new file, including format conversion withsource. - Use
patch_filewhen editing an existing file. Passexpected_sha256fromread_file. - Use
replace_fileonly when the user wants one existing file's exact bytes to overwrite another existing file. Read both files first and pass both returned SHA-256 values. It preserves the target path and Knowledge document identity, leaves the source unchanged, and never creates a missing target.
Do not regenerate an existing Office file just to make a small edit. Patch the existing file so the original package structure, editable source, and Knowledge document identity are preserved. When a change needs several edits to the same file, send them as multiple ordered operations in one patch_file call so they are saved through one Knowledge projection.
Convert an existing file
For Office-to-PDF conversion, call generate_file(kind="document", source={"path": "original.docx", "expected_sha256": "<source_sha256 from read_file>"}, name="converted.pdf", file_type="pdf"). This converts the exact original file with LibreOffice and creates a new Knowledge Document; do not pass extracted text as content or invoke a sandbox skill just to convert a supported file. The source stays unchanged. DOCX/PPTX/XLSX/XLSM and legacy DOC/PPT/XLS/WPS/DPS/ET can be exported to PDF; legacy files can also be converted to their corresponding DOCX/PPTX/XLSX format. inspect_file_engine reports the exact pairs and size limits. PDF-to-Office is not supported. Fonts available on the server can affect pagination, so inspect the result before claiming exact layout fidelity. If conversion fails, report the error; never silently replace the document with a text-only reconstruction.
Current patch coverage
For image format conversion (including HEIC/HEIF), read the uploaded image's resolved path with read_file(include_image=false), then call generate_file(kind="image", source={"path":"<resolved_path>","expected_sha256":"<source_sha256>"}, name="converted.png", file_type="png"). Call once per image when converting several attachments. PNG, JPEG and WebP outputs preserve full resolution and apply EXIF orientation; PNG/WebP keep alpha, JPEG uses a white background. This deterministic conversion requires no media model search, generation provider or sandbox. The source stays unchanged and the result is a new Knowledge Document. Multi-frame images and images over 40 megapixels are rejected rather than silently losing frames or resizing.
Template layout operations use the same executor in generation and patching:
paragraph.formattargets the same paragraph astext.set, without replacing text. Its non-emptyformatacceptsbold,italic,underline,strike(booleans),font_name,font_size,font_color(six RGB hex digits),alignment(left,center,right,justify),space_before,space_after,indent_left,indent_right,first_line_indent(points), andline_spacing(a line-height multiple). Negative first-line indents create hanging indents. Word also acceptskeep_with_next,keep_together,page_break_before,widow_controlbooleans and an existing paragraphstylename (a style alone is allowed). PPT acceptslevel0–8; changing level selects the existing list level, not a new bullet definition. Other text, links and properties remain unchanged. All existing runs and empty-paragraph typing styles are formatted; mixed-run range styling is not yet supported. The same plain-paragraph restrictions astext.setapply.page.setupchanges page geometry through a non-emptyformatin points. Word requires zero-basedsection_indexand supportswidth,height,margin_top,margin_bottom,margin_left,margin_right,header_distance,footer_distance. Set explicit dimensions to change orientation; width greater than height is landscape. Margins must leave positive content space. PPT supports whole-deckwidth/height(72–4032 points); this changes the canvas only, never scales or moves existing objects. Useshape.transformfor an intentional object-layout adjustment. Word distances require twentieth-point precision, PPT distances hundredth-point precision; font sizes keep their existing half-/hundredth-point limits.
read_file(include_structure=true) reports Word sections, paragraph_styles, paragraph_style_definitions, native text_boxes and body/header/footer inline or floating pictures, PPT page_size, explicit shape/picture format and bounded native chart data/format, and Excel sheet layout/page_setup plus bounded native table/merge/data-validation/conditional-format/picture/chart selectors, metadata, references and data, so template selectors and dimensions can be inspected before modification. PPT inherited theme styles are not materialized in this discovery result. These are runtime document operations, not a new tool or MCP. Do not claim full template parity for unsupported inherited or vendor-extension features.
Word/PPT text.set replaces exactly one existing plain-text paragraph, even if empty or duplicated elsewhere. DOCX uses a zero-based story-local index; omit story for the body, pass a header/footer story plus section_index, or pass package-wide text_box_index plus that text box's local paragraph index. PPTX uses one-based slide, slide-unique text-frame shape_id (top-level or inside a group), and zero-based paragraph index. Discover these with read_file(include_structure=true); Word reports story_structures and text_boxes, while PPT shapes report group_path, has_text_frame, paragraph count and bounded indexed text samples. The required text string may be empty to clear content. Newlines become soft line breaks, not extra paragraphs; CRLF/CR normalize to LF. Paragraph layout, list properties, Word section properties, PPT geometry, and other paragraphs are retained. Replacement inherits the first text run's style/link, or an empty paragraph's saved typing style; it does not redistribute new text across old mixed styles. Text is limited to 32,767 characters with no invalid control characters. Fields, embedded content, revisions, annotations/bookmarks and explicit page/column breaks are rejected atomically; text.replace remains available for supported text around them. Table cells continue to use cell.set. This operation works identically during generation and patching.
Color formatting uses opaque RGB: previous theme/tint/brightness/alpha modifiers are cleared only when the corresponding color is explicitly set. PPT shape formatting can additionally specify fill/line opacity.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/core/ai/skills/file_engine/SKILL.md
Popularity
- Repository stars
- 164
- Repository forks
- 52
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/manor-os/manor-ai/file-engine)