Copilot in SharePoint Skills let you save instructions the agent runs on demand. Write them once and anyone with the right permissions can trigger them with a simple phrase. In my opinion one of the best SharePoint AI features released to date. In this post I’ll cover what Skills are, how to create one, and walk through a contracts dashboard skill I’ve built that turns two SharePoint document libraries into a fully interactive HTML dashboard for contract reporting.

What Is a Skill?

A Skill is a markdown file that tells Copilot in SharePoint how to perform a specific, repeatable task. Think of it as saved instructions for your AI. You write it once, and from that point on anyone with View permissions on the site can trigger it with a natural language phrase and get a consistent result without knowing any of the steps involved. Worth noting: a skill can only perform actions the user already has permission to do, so it won’t expand access beyond what they’d normally have.

Skills can cover a wide range of tasks, for example:

  • Generate an interactive HTML dashboard from a document library
  • Produce a weekly project status report from a SharePoint list
  • Review all files in a library and apply or fix metadata in bulk
  • Run through an approval workflow and update list items based on the outcome
  • Onboard a new project site: create lists, set up views, apply formatting, and add automation rules in one go

When a user types something like “Create a contracts dashboard”, Copilot reads the Skill file, follows the instructions inside, and executes the task: reading library schemas, crunching data, generating charts, and saving the output. You can even daisy chain skills, with one skill calling another, which opens up some really powerful multi-step workflows.

Technically, a Skill is a SKILL.md file that lives in the AgentAssets/Skills/ folder in a SharePoint site. This is Microsoft’s defined location for skills and where Copilot knows to look. You can read more in the Microsoft Learn documentation on Skills. The file has a name and description at the top that helps the agent decide when to trigger the skill, followed by step-by-step instructions written in plain markdown:

No code, no power automate, no app registrations, no admin required. Just a markdown file and plain English.

How Do You Create a Copilot in SharePoint Skill?

You create a skill directly through Copilot in SharePoint’s FAB (Floating Action Button), the same interface you use to chat day-to-day in SharePoint. Describe what you want the skill to do in plain language and the agent generates the SKILL.md file and saves it into AgentAssets automatically.

For the contracts dashboard skill, the prompt I used was something like:

“Create a skill that generates an interactive HTML contracts dashboard from my SharePoint contract libraries. It should analyse both the Active and Drafts libraries, calculate KPIs like total contract value and expiring contracts, produce charts, and save a fully self-contained HTML file back to SharePoint with tabs, risk alerts, and recommendations.”

From that single prompt the agent produced a working first draft. I then refined it through plain English conversation, answering its clarifying questions, adding further detail, and providing example HTML output and recommendations logic until it was where I wanted it. The hard work was already done from the first prompt. It’s a fast way to go from idea to working skill.

If you’re looking for inspiration or want to see how others have built their skills, the PnP community has a SharePoint Skills GitHub repo where anyone can browse and submit skill files. I’ll be submitting my contracts dashboard skill and others there shortly. If you build one, add yours too.

How Do You Trigger a Skill?

Once a skill is saved in AgentAssets/Skills/, triggering it is as simple as typing a phrase in Copilot in SharePoint’s FAB that matches the skill’s description. Copilot will recognise the intent, load the skill, and start executing the steps automatically.

For example, typing “Create a contracts dashboard” is enough to kick off the entire six-step pipeline described in this post. You don’t need to reference the skill by name or know any of the steps involved. Copilot matches your phrase to the right skill and does the rest.

Another tip is you can also type --skills in the FAB to see a list of all skills available on your site and information about them.

The Contracts Dashboard Skill

The skill I’ve built solves a problem I see in a lot of organisations: document libraries full of valuable data that nobody can easily visualise. Contracts, invoices, purchase orders, project files — the data is all there in the metadata, but getting a clear picture of it usually means exporting to Excel or building a Power BI report.

My test site has two document libraries:

  • Active: signed contracts (mostly PDFs processed through eSignature), with metadata including Client Name, Contractor Name, Fee Amount, Contracting Service, Expiration Date, and eSign Status.
  • Drafts: Word documents in progress, with additional fields like Signed (boolean), Sign-off Status, and Word Count.

The skill turns all of this into a fully self-contained interactive HTML dashboard, saved directly back into SharePoint.

If you want to see exactly how the skill is built, I’ve included the full SKILL.md file below.

contracts-dashboard Skill.md (Click to Expand)

name: contracts-dashboard

description: Generates a comprehensive Contracts Administration Dashboard (HTML) from SharePoint contract libraries. Analyzes active and draft contracts to produce KPI cards, interactive tabbed charts, risk alerts, and recommendations. Use when the user asks for a contracts dashboard, contract portfolio analysis, or contract health report.

Contracts Dashboard

Generate a fully self-contained, interactive HTML Contracts Administration Dashboard from SharePoint contract document libraries.


Step 1: Discovery

  1. Identify contract document libraries on the site (e.g., “Active Contracts”, “Draft Contracts”, or similar).
  2. Retrieve schemas for each library using get_list_schema — identify key columns:
  • Financial: Fee/Value, Currency
  • Parties: Client, Contractor/Vendor
  • Dates: Start Date, Expiration Date, Termination Notice Period
  • Classification: Service Type, Contract Type, Category
  • Status: eSign Status, Signed/Unsigned, Approval Status
  1. Fetch all items from each library using list_items with appropriate viewFields.

Step 2: KPI Calculation

Compute these metrics using execute_code:

  • Total contracts (active + draft)
  • Active contract count
  • Draft contract count (and how many are unsigned)
  • Expired / Expiring Soon count (relative to today — call get_datetime_info first)
  • Total combined contract value (sum of fee fields)
  • Any other relevant KPIs discovered from the data

Step 3: Chart Generation

Use create_chart to generate charts. Batch ALL charts into ONE call. Typical charts include:

Active Library:

  • Service Type breakdown (pie/donut)
  • eSign Status (pie/donut)
  • Expiration timeline buckets (bar) — e.g., Already Expired, <30 days, 30-90 days, 90-180 days, 180-365 days, >1 year
  • Fee by Contractor (bar, sorted desc)
  • Fee by Client (bar, sorted desc)
  • Contract count by Client (bar)
  • Termination notice period distribution (bar)

Draft Library:

  • Fee by Contractor (bar)
  • Fee by Client (bar)
  • Service Type breakdown (pie/donut)
  • Expiration status (bar — how many expired before signing)

Adjust chart selection based on available data. If a column doesn’t exist, skip related charts.


Step 4: HTML Dashboard Assembly

Build the dashboard HTML using execute_code with outputDataRef: true, then save via create_text_file.

Structure

Header (gradient banner with title, site name, generation date)
KPI Strip (cards with color-coded borders: blue=default, green=success, amber=warning, red=alert)
Tabbed Content Area:
  Tab 1: Overview (executive summary, alert box, 2x2 chart grid)
  Tab 2: Active Fees (fee charts by contractor, client, volume)
  Tab 3: Active Status (eSign status, service type mix, termination notice)
  Tab 4: Active Risk (expiration timeline, termination periods, alerts)
  Tab 5: Drafts Pipeline (unsigned alerts, draft fee/type/expiration charts)
  Tab 6: Recommendations (actionable next steps)
Footer (generation timestamp)

Output Requirements

1. Fully Working HTML Page

Return a complete HTML file including:

  • All CSS inline in a <style> block
  • All JavaScript inline in a <script> block
  • Chart images embedded via the images manifest in create_text_file

The page must work if opened locally or hosted in SharePoint. No external dependencies — no frameworks, no CDN links, no external stylesheets or scripts.

2. Tabs MUST Be Functional

  • Build a tabbed navigation experience
  • Clicking a tab must show the correct content and update the active tab styling

Critical implementation rules:

  • Do NOT rely on global browser variables like event
  • Do NOT use inline onclick handlers
  • Use a single JavaScript event listener (event delegation) with data-tab attributes

Follow this pattern:

&lt;!-- Tab buttons use data-tab attributes -->
&lt;button class="tab-btn active" data-tab="overview">Overview&lt;/button>
&lt;button class="tab-btn" data-tab="active-fees">Active: Fees&lt;/button>
&lt;!-- ... more tabs ... -->
&lt;!-- Tab content panels use matching IDs -->
&lt;div id="overview" class="tab-content active">...&lt;/div>
&lt;div id="active-fees" class="tab-content">...&lt;/div>
&lt;!-- ... more panels ... -->
&lt;script>
document.querySelector('.tab-bar').addEventListener('click', function(e) {
  var btn = e.target.closest('.tab-btn');
  if (!btn) return;
  var tabId = btn.getAttribute('data-tab');
  document.querySelectorAll('.tab-content').forEach(function(el) {
    el.classList.remove('active');
  });
  document.querySelectorAll('.tab-btn').forEach(function(el) {
    el.classList.remove('active');
  });
  document.getElementById(tabId).classList.add('active');
  btn.classList.add('active');
});
&lt;/script>

Styling Guidelines

  • Font: Segoe UI family
  • Background: #f3f2f1
  • Header: gradient #0078D4 to #004578
  • KPI cards: white with colored top borders (blue default, green success, amber warning, red alert)
  • Alert boxes: light red background, red left border
  • Action boxes: light green background, green left border
  • Summary sections: light gray background, blue left border
  • Responsive: 2-column chart grid collapses to 1 column below 900px

Step 5: Risk Analysis & Recommendations

Include in the Recommendations tab:

  1. Urgent: Expired Contracts — List contracts that are expired and need renewal/archival. Suggest SharePoint rules for expiration alerts.
  2. Draft Pipeline Fix — Flag unsigned drafts, suggest approval workflows, “Days in Draft” calculated columns, SLA targets.
  3. Financial Visibility — Suggest fee tiers, grouped views by client, annual contract value columns.
  4. Metadata Standardization — Suggest Choice columns for free-text fields, Contract Status field, Renewal Type field.
  5. Proactive Alerts — Suggest SharePoint rules, Power Automate flows, conditional formatting on expiration dates.
  6. Quick Wins — Bullet list of things the user can do immediately.

Tailor recommendations to the actual data — don’t include generic advice that doesn’t apply.


Step 6: Save the File

Use create_text_file to save the dashboard as an .html file in the current document library. Use the images manifest to embed all chart images generated in Step 3.


Constraints

  • All styles must be inline in a <style> block — no external CSS
  • All scripts must be inline in a <script> block — no external JS
  • No rgb() in styles — use rgba(r,g,b,1) if needed
  • Charts are embedded as images via the images manifest — use {img:placeholder} markers in HTML content
  • Never load external resources (scripts, fonts, images, stylesheets)
  • Always call get_datetime_info to get the current date before calculating expirations
  • Adapt to whatever columns exist — not every library will have the same schema

Example Trigger Phrases

  • “Create a contracts dashboard”
  • “Build a contract portfolio report”
  • “Analyze my contracts and create a dashboard”
  • “Generate a contract health report”
  • “Show me a contracts overview dashboard”

How the Skill Works: A Six-Step Pipeline

Step 1: Discovery. Reads each library’s schema using get_list_schema so the skill adapts to whatever columns exist. Missing columns are skipped automatically.

Step 2: KPI Calculation. Computes total contracts, combined contract value, expired and expiring-soon counts, and unsigned draft count using execute_code. This tool runs JavaScript in the background to do the maths, counting items, summing fee values, and comparing dates against today to work out what’s expired or coming up for renewal. Pretty cool when you think about it – JavaScript running complex calculations directly inside SharePoint.

Step 3: Chart Generation. All charts are batched into a single create_chart call covering service type, eSign status, expiration timelines, and fees by contractor and client across both libraries.

Step 4: HTML Dashboard Assembly. Produces a fully self-contained HTML file with a KPI strip and six-tab layout (Overview, Active Fees, Active Status, Active Risk, Drafts Pipeline, Recommendations). All CSS and JS are inline with no external dependencies, which is required for SharePoint CSP compatibility. Note: tabs only work when the file is downloaded and opened locally but only the first page/tab shows in SharePoint. Hopefully the product team can fix this so tabs will work!

Step 5: Recommendations. The final tab includes tailored next steps based on the actual data: expired contracts, draft pipeline issues, metadata improvements, and automation suggestions.

Step 6: Save. The completed HTML file is saved back into the SharePoint document library.

What Tools Does Copilot in SharePoint Have Access To?

To appreciate the real potential of Skills it helps to see the full list of tools available. A Skill orchestrates these tools in sequence and there are a lot of them.

Note: This list reflects the tools available at the time of writing and will continue to grow as the product evolves.

File & Content Operations: Read files (text, Office docs, PDFs, XLSX, PPTX), create text-based files, find files by name or content, search by meaning, copy, move, delete, rename, and create folders. Analyse images with AI vision, compare Word document versions, and summarise files via the M365 agent.

List & Library Management: Discover all lists and libraries on a site, read schemas, create or update lists, filter and count items, create, update, bulk-update, and delete list items.

Views & Formatting: Get, preview, and delete views; apply custom column and view formatting.

Fields & Columns: Delete columns, or use AI-powered suggestions to recommend new ones based on your data.

Rules & Automation: Create, update, and delete automation rules and quicksteps.

Approvals: Check approval status, configure approval settings, create approval requests, and approve, reject, or cancel them.

Field Value Helpers: Resolve person names, lookup values, date/time formats, taxonomy terms, and location values. Essential for working with SharePoint’s more complex field types.

Recycle Bin & Restore: View the recycle bin, restore items, and restore deleted lists.

Charts & Code: Create bar, line, pie, and scatter charts; execute JavaScript for computation and data transformation.

Search & Navigation: Search across the M365 tenant, navigate to SharePoint pages, and access OneDrive details and favourites.

Skills: Create new skills and load existing ones into context. Copilot in SharePoint can create and load skills from within a conversation. The contracts dashboard skill in this post was created exactly that way.

That’s 60+ tools across file operations, list management, formatting, automation, approvals, and search, all available for a Skill to orchestrate. Worth getting into the habit of typing --agenttools in the Copilot in SharePoint chat regularly as this gives you a live overview of exactly which tools are available in your tenant, useful to check as the product continues to evolve.

Summary

Skills are natural language process automation on steroids for SharePoint. Write the instructions once and users with the right permissions can trigger complex multi-step tasks with a simple phrase. The contracts dashboard skill is a good example of what’s possible: schema discovery, KPI calculation, chart generation, and a styled HTML report, all from a single prompt. Imagine a few years ago imagining that you could do all of this all through plain text without any development ha!

I’m excited to test out more of the 60+ tools and build some more skills — ideas on my list include a Project Status Dashboard with RAG reporting, a Document Library Health Check for metadata and naming issues, an Invoice Processing Dashboard, and a List Audit & Tidy skill. There is loads of my previous SharePoint document management builds that I now want to revisit and add skills!!! Truly going to be very powerful and useful to a lot of document management systems!

If you’re exploring Copilot in SharePoint Skills and want to compare notes, feel free to get in touch.

This Post Has 2 Comments

  1. Praveena

    Hey, Awesome work with the contracts dashboard. I have a question regarding your dashboard md file. How are you making the skill store the html in a file in sharepoint? you have references of some filles names ‘execute_code” and “create_text_file”. What are those?

    “Step 4: HTML Dashboard Assembly
    Build the dashboard HTML using execute_code with outputDataRef: true, then save via create_text_file.”

  2. matthew

    similar to what Praveena is asking. None of the skills in that github work. They’re all generating files, which sharepoint Copilot says it cannot do

Leave a Reply