grammarly-core-workflow-b
Execute Grammarly secondary workflow: Core Workflow B. Use when implementing secondary use case, or complementing primary workflow. Trigger with phrases like "grammarly secondary workflow", "secondary task with grammarly".
What this skill does
# Grammarly AI & Plagiarism Detection
## Overview
Detect AI-generated content and check for plagiarism using Grammarly's detection APIs. AI Detection returns a score (0-100) indicating likelihood of AI generation. Plagiarism Detection compares text against billions of web pages and academic papers.
## Instructions
### Step 1: AI Detection Pipeline
```typescript
interface AIDetectionResult { score: number; status: string; }
async function detectAI(text: string, token: string): Promise<AIDetectionResult> {
const response = await fetch('https://api.grammarly.com/ecosystem/api/v1/ai-detection', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ text }),
});
return response.json();
}
// Batch check multiple documents
async function batchAIDetection(documents: Array<{ id: string; text: string }>, token: string) {
const results = [];
for (const doc of documents) {
const result = await detectAI(doc.text, token);
results.push({ ...doc, aiScore: result.score, isLikelyAI: result.score > 70 });
await new Promise(r => setTimeout(r, 500));
}
return results;
}
```
### Step 2: Plagiarism Detection (Async)
```typescript
async function checkPlagiarism(text: string, token: string) {
// Create request
const createRes = await fetch('https://api.grammarly.com/ecosystem/api/v1/plagiarism', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ text }),
});
const { id } = await createRes.json();
// Poll for results (async processing)
for (let i = 0; i < 30; i++) {
await new Promise(r => setTimeout(r, 3000));
const statusRes = await fetch(`https://api.grammarly.com/ecosystem/api/v1/plagiarism/${id}`, {
headers: { 'Authorization': `Bearer ${token}` },
});
const result = await statusRes.json();
if (result.status !== 'pending') return result;
}
throw new Error('Plagiarism check timed out');
}
```
### Step 3: Combined Content Quality Pipeline
```typescript
async function fullContentAudit(text: string, token: string) {
const [score, ai, plagiarism] = await Promise.all([
scoreDocument({ text }, token),
detectAI(text, token),
checkPlagiarism(text, token),
]);
return {
writingScore: score.overallScore,
correctness: score.correctness,
clarity: score.clarity,
aiLikelihood: ai.score,
plagiarismScore: plagiarism.score,
plagiarismMatches: plagiarism.matches?.length || 0,
passed: score.overallScore >= 70 && ai.score < 50 && plagiarism.score < 20,
};
}
```
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `400` text too short | < 30 words | Ensure minimum length |
| Poll timeout | Processing taking long | Increase poll duration |
| AI score inconsistent | Short text | AI detection works best on 200+ words |
## Resources
- [AI Detection API](https://developer.grammarly.com/ai-detection-api.html)
- [Plagiarism Detection API](https://developer.grammarly.com/plagiarism-detection-api.html)
## Next Steps
For common errors, see `grammarly-common-errors`.
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.