1. Configure .gitignore
Create or update the.gitignore file with the following minimum configuration:
2. Configure .npmignore
Create or update the.npmignore file to ensure only necessary files are included in the npm package:
3. Add MIT License
Create aLICENSE file in the root directory with the following content:
4. Verify package.json
Ensure thepackage.json file contains all required fields:
Basic Fields
-
name: Package name (should match npm registry requirements) -
version: Semantic version (e.g., “1.0.0”) -
description: Clear description of the plugin -
main: Entry point (typically “dist/index.js”) -
types: TypeScript definitions (typically “dist/index.d.ts”) -
author: Author information -
license: “MIT” -
repository: Git repository information -
keywords: Relevant keywords for npm search -
scripts: Build, test, and other necessary scripts -
dependencies: All runtime dependencies -
devDependencies: All development dependencies -
peerDependencies: If applicable (e.g., “@elizaos/core”)
Additional Important Fields
-
type: Should be “module” for ESM modules -
module: Same as main for ESM (typically “dist/index.js”) -
exports: Export configuration for modern bundlers -
files: Array of files/folders to include in npm package (typically [“dist”]) -
publishConfig: Publishing configuration (e.g.,{"access": "public"})
Eliza Plugin Configuration (agentConfig)
For Eliza plugins, you MUST include theagentConfig section:
Parameter Properties:
type: Data type (“string”, “number”, “boolean”, etc.)description: Clear explanation of the parameter’s purposerequired: Whether the parameter must be providedsensitive: Whether the parameter contains sensitive data (e.g., API keys)default: Optional default value if not required
Example for Avalanche Plugin:
5. Review README.md
Verify that the README.md file includes:- Clear project title and description
- Installation instructions
- Usage examples
- Configuration requirements
- API documentation (if applicable)
- Contributing guidelines
- License information
- Contact/support information
Final Checklist
Before committing and publishing:- Run
bun run buildto ensure the project builds successfully - Run tests to verify functionality
- Ensure all environment variables are documented
- Remove any sensitive information or API keys
- Verify all file paths and imports are correct
- Check that the dist/ folder is properly generated
- Confirm version number is appropriate for the release
Notes
- The
.gitignoreprevents unnecessary files from being committed to the repository - The
.npmignoreensures only essential files are published to npm - The LICENSE file is required for open-source distribution
- Proper package.json configuration is crucial for npm publishing and dependency management
6. GitHub Workflow for Automated NPM Release
Prerequisites
Adding the Release Workflow
Create the following file in your repository to enable automated npm publishing when the version changes: File Path:.github/workflows/npm-deploy.yml
How This Workflow Works
-
Triggers on:
- Push to the 1.x branch
- Manual workflow dispatch
-
Version Check:
- Compares the current package.json version with the previous commit
- Only proceeds if the version has changed
-
Publishing Steps:
- Creates a git tag with the version
- Builds the package using Bun
- Publishes to npm using the NPM_TOKEN secret
- Creates a GitHub release
Setting Up NPM Token
- Go to your GitHub repository settings
- Navigate to Settings → Secrets and variables → Actions
- Add a new repository secret named
NPM_TOKEN - Use your npm access token as the value
7. Code Formatting with Prettier
Before finalizing the plugin, ensure consistent code formatting:Install Prettier (if not already installed)
Add Prettier Configuration
Required config don’t hallucinate and add anything else! Create a.prettierrc file in the root directory:
Add Format Script to package.json
Run Prettier
Final Steps Before Committing to 1.x Branch
- Ensure all files listed in this document are created
- Run the build to verify everything compiles
- Run prettier to format all code consistently
- Test the package locally if possible
- Commit all changes with a clear message
- Push to the 1.x branch
- Verify the GitHub Action runs successfully on first push

