microsoft-agent-skills / rules
Cursor rule0 starsChanged 3 months agoMITView on GitHub
Fix and prevent Power Platform solution imports that break on connection references, environment variables and flow ownership. Use when a solution import fails or needs manual reconnection in the target environment, when flows turn themselves off after deployment, when a departing employee breaks production, or when setting up a deployment pipeline that should not need hand-holding.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- RagnarPitla/microsoft-agent-skills-private-archiveword for word, first seen Aug 20, 2026
Other versions1 project uses a version of this.
Word for word · 1
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,183 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/ask-ragnar.mdcCursor rule
- .cursor/rules/assess-change-blast-radius.mdcCursor rule
- .cursor/rules/choose-agent-platform.mdcCursor rule
- .cursor/rules/copilot-studio-auth-patterns.mdcCursor rule
- .cursor/rules/copilot-studio-knowledge-grounding.mdcCursor rule
- .cursor/rules/copilot-studio-production-patterns.mdcCursor rule
- .cursor/rules/de-slop.mdcCursor rule
- .cursor/rules/discovery.mdcCursor rule
- .cursor/rules/evaluate-agent-quality.mdcCursor rule
- .cursor/rules/explain-concept.mdcCursor rule
- .cursor/rules/govern-agent-lifecycle.mdcCursor rule
- .cursor/rules/ground-agents-in-work-context.mdcCursor rule
- .cursor/rules/migrate-agent-to-skills.mdcCursor rule
- .cursor/rules/monitor-agent-telemetry.mdcCursor rule
- .cursor/rules/plan-agent-capacity-and-cost.mdcCursor rule
- .cursor/rules/respond-to-agent-incidents.mdcCursor rule
- .cursor/rules/review-copilot-studio-agent.mdcCursor rule
- .cursor/rules/structured-interview.mdcCursor rule
- .cursor/rules/what-should-i-build.mdcCursor rule
- .cursor/rules/write-a-skill.mdcCursor rule
- ask-ragnarSkill
- assess-change-blast-radiusSkill
- choose-agent-platformSkill
- copilot-studio-auth-patternsSkill
- copilot-studio-knowledge-groundingSkill
- copilot-studio-production-patternsSkill
- de-slopSkill
- discoverySkill
- evaluate-agent-qualitySkill
- explain-conceptSkill
- govern-agent-lifecycleSkill
- ground-agents-in-work-contextSkill
- migrate-agent-to-skillsSkill
- monitor-agent-telemetrySkill
- plan-agent-capacity-and-costSkill
- power-platform-alm-connection-refsSkill
- respond-to-agent-incidentsSkill
- review-copilot-studio-agentSkill
- structured-interviewSkill
- what-should-i-buildSkill
- write-a-skillSkill
- copilot-studio-knowledge-groundingSkill
- copilot-studio-production-patternsSkill
- migrate-agent-to-skillsSkill
- write-a-skillSkill
- copilot-studio-auth-patternsSkill
- ground-agents-in-work-contextSkill
- ask-ragnarSkill
- choose-agent-platformSkill
- de-slopSkill
- discoverySkill
- structured-interviewSkill
- what-should-i-buildSkill
- explain-conceptSkill
- govern-agent-lifecycleSkill
- monitor-agent-telemetrySkill
- plan-agent-capacity-and-costSkill
- power-platform-alm-connection-refsSkill
- The first 60 shown.
The file
We split this power-platform-alm-connection-refs.mdc into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Ask which of these is happening, because the fixes differ:
- Distinctive: line 22
Import prompts for connections every time: No deployment settings are being supplied, so each import is a manual dance.
- Distinctive: line 45
Ask directly: if the person who built this left tomorrow, what stops working?
- Distinctive: line 135
Treat "it works now" as resolved when the connection is still personally owned.
- Distinctive: line 151
If a link 404s, the page was probably renamed.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: "Fix and prevent Power Platform solution imports that break on connection references, environment variables and flow ownership. Use when a solution import fails or needs manual reconnection in the target environment, when flows turn themselves off after deployment, when a departing employee breaks production, or when setting up a deployment pipeline that should not need hand-holding." alwaysApply: false --- <!-- Generated from SKILL.md by scripts/build-harnesses.mjs. Do not edit by hand; run `npm run build`. --> <!-- Source: skills/operate/power-platform-alm-connection-refs/SKILL.md --> Connection reference breakage on import is the most reported ALM pain in Power Platform. Almost all of it comes from the same root: **the solution carries a reference to a connection that only exists in the environment it was built in**, and nothing told the target environment what to use instead. The re-authentication experience after import is a product limitation. The reasons you are hitting it usually are not. ## Diagnose first Ask which of these is happening, because the fixes differ: - **Import succeeds, flows are off or failing.** Connection references resolved to nothing and the flow cannot run. The usual case. - **Import prompts for connections every time.** No deployment settings are being supplied, so each import is a manual dance. - **Worked for months, then broke.** Almost always ownership: someone left, changed a password, or hit an MFA prompt. The connection was personal. - **Works in test, fails in production only.** Environment-specific configuration is hardcoded, or the production identity lacks something the test identity had. - **Import fails outright.** Usually a missing dependency or a managed/unmanaged layering problem, not connections. Different conversation. ## The four causes worth fixing ### 1. Connections owned by a person **The one that eventually bites everyone.** A flow authenticating as a named individual is a production dependency on that person's employment, password and MFA state. When they leave, production breaks, and it breaks at a time nobody chose. Deployment identities should be service principals, not people. This is the single highest-value change and it is usually deferred because personal connections work fine right up until they do not. Ask directly: if the person who built this left tomorrow, what stops working? The answer is often unwelcome and always clarifying. ### 2. No deployment settings supplied at import Connection references and environment variables are *designed* to be bound per environment. If you do not supply those bindings at import time, the target has nothing to bind to and you get the manual reconnection prompt. The fix is to supply a settings file per environment as part of the import, so each target gets its own values without touching the solution. The Power Platform CLI both generates and consumes these; see the CLI documentation for current command syntax rather than trusting a command copied from a blog post, because the flags have changed over time. The important habit: **the settings file is per environment and belongs in source control alongside the pipeline** - not generated by hand each time. ### 3. Environment-specific values baked into the solution A hardcoded URL, site, list, table or key means the solution is not portable and never will be. Every such value should be an environment variable, seeded per environment. Watch for the half-migration: environment variables created, but with default values that silently work in test, so nobody notices production is using the wrong one until it does something visible. ### 4. Unmanaged in production Importing unmanaged into a downstream environment makes changes there permanent and un-removable, and layering problems follow. Development environments are unmanaged; everywhere else is managed. If production is already unmanaged, say plainly that this is a cleanup project, not a quick fix. ## Pre-import checklist Worth walking before promoting anything to production. **Identity** - Is the import running as a service principal rather than a person? - Does that identity have access in the target environment, and to the connections it is expected to own? - Is the client secret or certificate rotation tracked? Expiry is a scheduled outage nobody schedules. **Bindings** - Is there a deployment settings file for *this* target environment? - Is every connection reference in it, and does each point at a connection that exists in the target? - Is every environment variable in it, with a value that is right for this environment rather than inherited from a default? **Solution hygiene** - Managed, going to a non-development environment? - Are all dependencies present in the target, including any the solution assumes rather than declares? - Is the publisher prefix the intended one? Wrong prefixes are painful to correct after the fact. **After import** - Are the flows actually on? Import success does not mean running. - Did anything need manual reconnection? If so, the settings file is incomplete, and fixing it now is what prevents this recurring next time. ## Say plainly what is a product limitation - The **re-authentication experience** after import is genuinely awkward. You can automate around it with service principals and settings files; you cannot make it elegant. - **Copilot Studio knowledge sources** are bound to the environment where the agent was created, and there is no supported way to parameterise them the way you would an environment variable. If someone is fighting this, tell them it is a known gap rather than letting them keep looking for the setting. Treat knowledge bindings as per-environment configuration with a documented post-deployment rebinding step, and revisit if Microsoft ships native support. - Some connectors behave differently under a service principal than under a user. Where that is the case it is a connector constraint, not a configuration error. ## Do not - Quote exact CLI command syntax, flags or file schema from memory. These have changed more than once. Describe what the step does and link the CLI documentation. - Recommend re-creating the solution to fix layering. It is occasionally right and usually a very expensive way to avoid understanding the problem. - Assume Azure DevOps. GitHub Actions, Power Platform Pipelines and manual imports are all in use, and the advice differs. - Treat "it works now" as resolved when the connection is still personally owned. That is a deferred outage, and it should be named as one. ## Sources Verified as resolving on 2026-08-18. - Power Platform ALM overview: https://learn.microsoft.com/en-us/power-platform/alm/overview-alm - Environment strategy for ALM: https://learn.microsoft.com/en-us/power-platform/alm/environment-strategy-alm - Power Platform CLI, for current command syntax: https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction - Creating a service principal for Power Platform: https://learn.microsoft.com/en-us/power-platform/admin/powerplatform-api-create-service-principal If a link 404s, the page was probably renamed. Say you could not verify it rather than guessing a replacement URL.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

