Publish local test projects, use cases, test cases, and test scripts to Muggle AI cloud. Use when the user asks to publish, upload, sync to cloud, or deploy tests to production. Handles authentication, URL inheritance for production, and cloud ID mapping.
From muggle-ai-teamsnpx claudepluginhub multiplex-ai/muggle-ai-teams --plugin muggle-ai-teamsThis skill uses the workspace's default tool permissions.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Publish local test artifacts to Muggle AI cloud for production testing, scheduling, and team collaboration.
Check Authentication → Login if needed
↓
Select Project to Publish
↓
Resolve Production URL (inheritance chain)
↓
Check Existing Cloud Project → Create or Update
↓
Sync Use Cases, Test Cases, Test Scripts
↓
Confirm Publication → Return Cloud URLs
This skill is Local MCP only. If Local MCP tools are unavailable or a required Local MCP step fails, stop and fail this workflow.
Do not fall back to generic browser testing features/tools to continue execution.
When failing, clearly report:
Call muggle_auth_status to verify login state.
If not authenticated:
muggle_auth_login to start device code flowmuggle_auth_poll until completeIf authenticated: Proceed to next step.
Call muggle_project_list to show available local projects.
Present options:
Local projects available for publishing:
1. proj_abc - "My Web App" (http://localhost:3000)
- originalUrl: https://app.example.com (from cloud pull)
- 3 use cases, 8 test cases, 5 test scripts
- Last modified: 2 hours ago
2. proj_def - "Admin Portal" (http://localhost:4000)
- No originalUrl set
- 2 use cases, 4 test cases, 2 test scripts
- Last modified: 1 day ago
Which project to publish?
If user specifies project name: Match and confirm.
Before publishing, determine the production URL using the inheritance chain.
For each entity being published, resolve URL in this order:
1. Test Case URL (if not localhost)
↓ (skip if localhost or empty)
2. Test Case originalUrl (from cloud pull)
↓ (skip if empty)
3. Use Case URL (if field exists and not localhost)
↓ (skip if localhost or empty)
4. Project URL (if not localhost)
↓ (skip if localhost)
5. Project originalUrl (from cloud pull)
↓ (skip if empty)
6. Ask User for production URL
| URL Type | Action |
|---|---|
http://localhost:* | Skip, try next in chain |
http://127.0.0.1:* | Skip, try next in chain |
https://*.example.com | Valid, use this |
https://staging.* | Valid, use this |
| Empty/null | Skip, try next in chain |
function resolveProductionUrl(testCase, useCase, project):
# Check test case URL
if testCase.url and not isLocalhost(testCase.url):
return testCase.url
# Check test case originalUrl (from cloud pull)
if testCase.originalUrl:
return testCase.originalUrl
# Check project URL
if project.url and not isLocalhost(project.url):
return project.url
# Check project originalUrl (from cloud pull)
if project.originalUrl:
return project.originalUrl
# Ask user
return askUserForProductionUrl()
Scenario: Project was pulled from cloud, tested locally, now publishing.
| Entity | url | originalUrl | Resolved |
|---|---|---|---|
| Project | localhost:3000 | https://app.example.com | - |
| Test Case A | localhost:3000/login | https://app.example.com/login | https://app.example.com/login (from originalUrl) |
| Test Case B | localhost:3000/dashboard | (none) | https://app.example.com (from project.originalUrl) |
| Test Case C (new) | localhost:3000/settings | (none) | Ask user |
Only ask user for production URL when:
Prompt:
Test case "Login Flow" needs a production URL for cloud testing.
Current URL: http://localhost:3000/login
No production URL found in:
- Test case originalUrl: (not set)
- Project originalUrl: (not set)
Enter production URL (e.g., https://app.example.com/login):
Call muggle_publish_project which internally checks for existing cloud mapping.
Behavior:
cloudProjectId → Updates existing cloud projectcloudSource.cloudProjectId → Updates that cloud projectWhat gets synced:
{
"projectId": "<local_project_id>",
"targetUrl": "<resolved_production_url>" // From inheritance chain
}
Returns:
cloudProjectId - The cloud project IDcloudUseCaseIds - Mapping of local → cloud use case IDscloudTestCaseIds - Mapping of local → cloud test case IDsviewUrl - URL to view project in Muggle AI dashboardWhen publishing, the tool should:
If user wants to publish only specific test scripts:
{
"projectId": "<local_project_id>",
"testScriptId": "<local_test_script_id>",
"cloudProjectId": "<cloud_project_id>",
"cloudUseCaseId": "<cloud_use_case_id>",
"cloudTestCaseId": "<cloud_test_case_id>"
}
Note: Test scripts are automatically uploaded to Firebase during generation. This tool confirms cloud status and returns the view URL.
After successful publish, report:
Publication Complete
====================
Project: "My Web App"
Cloud URL: https://app.muggle-ai.com/projects/cloud_proj_123
Production URL: https://app.example.com (inherited from originalUrl)
Published:
[OK] 3 use cases
[OK] 8 test cases
[OK] 5 test scripts
URL Resolution:
- 6 test cases: Used originalUrl from cloud pull
- 2 test cases: Used project.originalUrl
- 0 test cases: Asked user (all had inherited URLs)
Cloud IDs mapped locally for future syncs.
Next steps:
- View in dashboard: https://app.muggle-ai.com/projects/cloud_proj_123
- Schedule automated runs
- Share with team members
User can choose what to publish:
User: "Publish my project"
Publishes: Project + all use cases + all test cases + all test scripts
User: "Publish only the login use case"
muggle_use_case_list → Find matching use caseUser: "Publish only what's new"
User: "Publish my tests to the cloud"
Agent:
muggle_auth_status → Authenticatedmuggle_project_list → Found "My Web App" (localhost:3000, originalUrl: https://app.example.com)https://app.example.commuggle_publish_project with resolved URLUser: "Publish my tests to the cloud"
Agent:
muggle_auth_status → Authenticatedmuggle_project_list → Found "New App" (localhost:4000, no originalUrl)muggle_publish_project with user-provided URLUser: "Publish my project"
Agent:
muggle_project_list → Found project with originalUrlmuggle_publish_projectUser: "Sync my project to the cloud"
Agent:
muggle_auth_status → Authenticatedmuggle_project_list → User has 1 project with cloud mappingmuggle_publish_project → Updates existing cloud project| Action | Tool |
|---|---|
| Check login | muggle_auth_status |
| Start login | muggle_auth_login |
| Complete login | muggle_auth_poll |
| List projects | muggle_project_list |
| Get project details | muggle_project_get |
| Update project URL | muggle_project_update |
| Publish project | muggle_publish_project |
| Publish test script | muggle_publish_test_script |
| Source | Priority | When Used |
|---|---|---|
| Test Case URL | 1 | If not localhost |
| Test Case originalUrl | 2 | If set (from cloud pull) |
| Project URL | 3 | If not localhost |
| Project originalUrl | 4 | If set (from cloud pull) |
| Ask User | 5 | Last resort |