Skills sharepoint-by-altf1be
Secure SharePoint file operations and Office document intelligence via Microsoft Graph API — certificate auth, Sites.Selected, read/write Word (mammoth), Excel (exceljs), PowerPoint (jszip), PDF (pdf-parse).
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/abdelkrim/sharepoint-by-altf1be" ~/.claude/skills/openclaw-skills-sharepoint-by-altf1be && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/abdelkrim/sharepoint-by-altf1be" ~/.openclaw/skills/openclaw-skills-sharepoint-by-altf1be && rm -rf "$T"
manifest:
skills/abdelkrim/sharepoint-by-altf1be/SKILL.mdsource content
SharePoint by @altf1be
Interact with SharePoint document libraries via Microsoft Graph API using certificate-based authentication.
Setup
- Create an Entra app with
permission and certificate authSites.Selected - Grant site-level write access via Microsoft Graph PowerShell
- Set environment variables (or create
in.env
):{baseDir}
SP_TENANT_ID=your-azure-tenant-id SP_CLIENT_ID=your-app-client-id SP_CERT_PATH=/path/to/certificate.pem SP_SITE_ID=your-sharepoint-site-id SP_DRIVE_ID=optional-specific-drive-id
- Install dependencies:
cd {baseDir} && npm install
Commands
File operations
# Show site and drive info node {baseDir}/scripts/sharepoint.mjs info # List files in library root node {baseDir}/scripts/sharepoint.mjs list # List files in a subfolder node {baseDir}/scripts/sharepoint.mjs list --path "Meeting Notes/2026" # Read file content (extracts text from Office formats) node {baseDir}/scripts/sharepoint.mjs read --path "Report.docx" # Upload a file node {baseDir}/scripts/sharepoint.mjs upload --local ./report.docx --remote "Reports/Q1-2026.docx" # Search for files node {baseDir}/scripts/sharepoint.mjs search --query "quarterly review" # Create folder node {baseDir}/scripts/sharepoint.mjs mkdir --path "Meeting Notes/2026" # Delete (requires --confirm flag) node {baseDir}/scripts/sharepoint.mjs delete --path "Drafts/old-file.txt" --confirm
Coauthoring (checkout/checkin)
# Safe edit: checkout → upload modified file → checkin (recommended) node {baseDir}/scripts/sharepoint.mjs edit --path "Report.docx" --local ./modified.docx --comment "Updated summary" # Check out a file (lock for exclusive editing) node {baseDir}/scripts/sharepoint.mjs checkout --path "Report.docx" # Check in a file (unlock + publish) node {baseDir}/scripts/sharepoint.mjs checkin --path "Report.docx" --comment "Reviewed and approved" # Get an edit link to open in Office Online node {baseDir}/scripts/sharepoint.mjs edit-link --path "Report.docx"
Supported Office formats
The
read command extracts text content from:
→ full text extraction via mammoth.docx
→ sheet names + cell data via exceljs.xlsx
→ slide text extraction via jszip.pptx
→ text extraction via pdf-parse.pdf
/.txt
→ raw content.md
Output is plain text suitable for AI processing (summarization, reformatting, action item extraction).
Dependencies
— certificate-based Azure AD authentication@azure/identity
— Microsoft Graph API client@microsoft/microsoft-graph-client
— Word document text extractionmammoth
— Excel spreadsheet parsingexceljs
— PowerPoint XML extractionjszip
— PDF text extractionpdf-parse
— CLI frameworkcommander
— environment variable loadingdotenv
Security
- Certificate auth only (no client secrets, no passwords)
permission (access limited to one SharePoint site)Sites.Selected- Path traversal prevention:
is rejected../ - Delete requires explicit
flag--confirm - No tokens or secrets printed to stdout
- File size limit: configurable max (default 50MB)
Full setup guide
For complete setup from scratch (Entra app, certificate, Sites.Selected, Key Vault): See the GitHub repository README.
Author
Abdelkrim BOUJRAF — ALT-F1 SRL, Brussels 🇧🇪 X: @altf1be