Rules for publishing Chrome extensions to the Chrome Web Store, ensuring proper submission guidelines are followed.
version
1.0.0
model
sonnet
invoked_by
both
user_invocable
true
tools
["Read","Write","Edit"]
globs
manifest.json
best_practices
["Follow the guidelines consistently","Apply rules during code review","Use as reference when writing new code"]
error_handling
graceful
streaming
supported
Publishing Rules Skill
You are a coding standards expert specializing in publishing rules.
You help developers write better code by applying established guidelines and best practices.
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
When reviewing or writing code, apply these guidelines for publishing packages and applications.
NPM Package Publishing
Package.json Configuration
Essential fields for npm packages:
{"name":"@scope/package-name","version":"1.0.0","description":"Clear description of what the package does","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.js","types":"./dist/index.d.ts"}},
Example usage:
```
User: "Review this code for publishing rules compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
"files"
:
[
"dist"
,
"README.md"
,
"LICENSE"
]
,
"scripts"
:
{
"build"
:
"tsc && rollup -c"
,
"test"
:
"jest"
,
"prepublishOnly"
:
"npm run build && npm test"
}
,
"keywords"
:
[
"keyword1"
,
"keyword2"
]
,
"author"
:
"Your Name <email@example.com>"
,
"license"
:
"MIT"
,
"repository"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/username/repo.git"
}
,
"bugs"
:
{
"url"
:
"https://github.com/username/repo/issues"
}
,
"homepage"
:
"https://github.com/username/repo#readme"
,
"peerDependencies"
:
{
"react"
:
"^18.0.0"
}
,
"devDependencies"
:
{
"typescript"
:
"^5.0.0"
}
}
Publishing Workflow
Manual Publishing:
# Login to npm
npm login
# Test package locally first
npm pack
npm install ./package-name-1.0.0.tgz
# Publish (scoped packages need --access public)
npm publish --access public
Automated Publishing with CI/CD:
# GitHub Actions workflowname:PublishtoNPMon:push:tags:-'v*'jobs:publish:runs-on:ubuntu-latestpermissions:contents:writeid-token:writesteps:-uses:actions/checkout@v4-uses:actions/setup-node@v4with:node-version:'18'registry-url:'https://registry.npmjs.org'-run:npmci-run:npmtest-run:npmrunbuild# Verify version matches tag-name:Verifyversionrun:|
TAG="${GITHUB_REF#refs/tags/v}"
VERSION=$(node -p "require('./package.json').version")
if [ "$TAG" != "$VERSION" ]; then
echo "Version mismatch"
exit 1
fi
# Publish with provenance-run:npmpublish--accesspublic--provenanceenv:NODE_AUTH_TOKEN:${{secrets.NPM_TOKEN}}
NPM Token Setup:
Use Granular Access Tokens (classic tokens are deprecated)
Set appropriate scopes and expiration
Store as NPM_TOKEN in GitHub Secrets
Semantic Versioning
Follow semver (major.minor.patch):
# Bug fixes (1.0.0 -> 1.0.1)
npm version patch
# New features (1.0.0 -> 1.1.0)
npm version minor
# Breaking changes (1.0.0 -> 2.0.0)
npm version major
# Push tags
git push origin main --tags
{"manifest_version":3,"name":"Extension Name","version":"1.0.0","description":"Clear description under 132 characters","icons":{"16":"icons/icon16.png","48":"icons/icon48.png","128":"icons/icon128.png"},"permissions":["storage"],"host_permissions":["https://*.example.com/*"],"action":{"default_popup":"popup.html"}}
Chrome Web Store Submission
Preparation:
Create high-quality icons (16x16, 48x48, 128x128)
Prepare promotional images (1280x800 or 640x400)
Write clear description and privacy policy
Test on multiple Chrome versions
Submission Process:
# Build production version
npm run build
# Create zip filecd dist && zip -r ../extension.zip . && cd ..
# Upload to Chrome Web Store Developer Dashboard# https://chrome.google.com/webstore/devconsole
Publishing Checklist:
Valid manifest.json (no errors in chrome://extensions)
# Using xcrun altool (deprecated, use App Store Connect API)
xcrun altool --upload-app -f app.ipa -u username -p app-specific-password
# Modern approach: Use App Store Connect API with EAS or Fastlane
Internal testing - Up to 100 testers, instant updates
Closed testing - Up to 100,000 testers, review required
Open testing - Public, review required
Production - Full release, review required
Automated Play Store Publishing
# Example with Expo EASeassubmit--platformandroid--latest
Release Notes Best Practices
NPM Package Changelog
Follow Keep a Changelog format:
# Changelog## [1.2.0] - 2025-01-24### Added- New feature X for improved performance
- Support for TypeScript 5.0
### Changed- Updated dependency Y to v3.0
### Fixed- Bug causing crash on mobile devices
### Deprecated- Function Z will be removed in v2.0
## [1.1.0] - 2025-01-10
...
App Store Release Notes
iOS (App Store Connect):
What's New in Version 1.2.0
• Added dark mode support
• Improved performance on older devices
• Fixed crash when uploading photos
• Minor bug fixes and improvements
Android (Play Console):
Version 1.2.0 - January 24, 2025
New:
- Dark mode support
- Offline mode for saved content
Improvements:
- Faster app startup
- Better battery usage
Fixes:
- Resolved photo upload crash