AI & Agents

How to Sync Cline Rules Across Teams in VS Code

Syncing Cline rules enables development teams to enforce consistent coding standards, architectural bounds, and agent behaviors across workspaces. Discover how to check .clinerules into Git, manage context windows to optimize token spend, and integrate shared Fast.io workspaces.

Fast.io Editorial Team 9 min read
Syncing Cline rules across team workspaces in VS Code

Why Shared AI Agent Rules Prevent Team Context Drift

Version control is the standard synchronization mechanism for software engineering, with 93.87% of professional developers relying on Git to align their codebases, as tracked by the Stack Overflow Developer Survey 2022. Yet when teams adopt autonomous coding agents like Cline, they frequently leave their system prompt modifications and coding rules in local files. This configuration creates context drift, where the agent writes code matching one developer's local preferences but breaks the shared style guide or architectural patterns of another. When agents lack shared workspace rules, developers waste hours checking generated code manually or debugging database models that do not align with the team's standards.

Without a unified rule distribution system, the efficiency of AI-assisted engineering decreases. Individual team members spend valuable context tokens pasting style guides, framework parameters, and file path rules into their chat sessions. Distributed teams need a consistent mechanism to define what files the agent is allowed to write, which packages are preferred, and how files should be structured. Synchronizing instructions ensures that every team member, human and agent, operates with identical design patterns and safety constraints.

Creating and Naming the .clinerules File in Project Roots

The primary mechanism for workspace-specific rules in Cline is the .clinerules file. When you open a folder in VS Code, the Cline extension checks for this file at the project root directory. If present, the agent automatically reads its contents and appends them to the system prompt on startup. This file allows teams to define precise instructions that govern how the agent interacts with that specific codebase.

To set up a team rule system, create a file named .clinerules in the root of your project directory. Write the instructions in standard Markdown format. The document should contain clear sections detailing your project's technology stack, coding conventions, architectural boundaries, and safety constraints.

A typical .clinerules file structure includes:

  • Project Context: Specify the programming languages, framework versions, database adapters, and styling systems used in the project.
  • Coding Standards: Define rules for naming conventions, variable declaration styles, and design patterns, such as composing components instead of nesting them.
  • Directory Constraints: Outline which folders the agent is allowed to create, edit, or delete, and mark legacy or sensitive directories as read-only.
  • Safety Constraints: Instruct the agent to run local linter checks or run tests before declaring a coding task complete.

By placing these directives in a single .clinerules file in the project root, you ensure that anyone who opens the workspace in VS Code immediately equips their Cline extension with the project's instructions. As of August 2026, this workspace-level configuration is the most reliable way to maintain team-wide agent behaviors in VS Code.

How to Sync Cline Rules Across Teams in VS Code Using Git

Once you have created and verified your project's .clinerules file, the next step is distributing it to the team. By checking the file directly into Git, you make rule updates as trackable and reviewable as code changes. When a developer pulls the latest commits from the main repository, their local Cline extension immediately picks up the updated rules without manual file transfer.

To include your rule file in version control, verify your .gitignore configuration. Many default Git templates ignore files starting with a dot or target custom configuration files. Ensure that .clinerules is not ignored by checking your .gitignore for generic patterns. If needed, you can explicitly track the file by running git add .clinerules in your terminal. When updating the rules, developers should commit the changes with descriptive messages, allowing the team to review prompts and see why constraints were added.

While developers can use raw cloud storage buckets like Amazon S3 or generic cloud drives like Google Drive to back up configuration files, these platforms lack the collaborative versioning required for active agent workflows. Fast.io serves as an intelligent workspace platform built for human-agent collaboration. By placing your project folders in Fast.io workspaces, developers and agents collaborate on the same files with full per-file version history. Recipients always see the current version with history available, ensuring that even if an agent overwrites a critical config or rule file during execution, previous versions can be restored.

Fastio features

Sync Cline rules across team workspaces

Keep your development environment aligned by sharing your Cline rules in persistent, version-controlled workspaces. Start your 14-day trial today.

How to Align VS Code Profiles and Settings Sync

While Git distributes the .clinerules file, teams also need to ensure that the Cline extension itself is configured identically across developer environments. Developers often ask whether they can synchronize .clinerules using VS Code Settings Sync. The built-in Settings Sync service only synchronizes user preferences, keyboard shortcuts, snippets, extension lists, and UI state; it does not sync workspace files like .clinerules.

To bridge this gap, teams should combine Git tracking with VS Code Profiles. Profiles allow you to group settings, configurations, and extensions for specific development tasks. You can create a profile for your team's project, pre-configure Cline's model selection and API endpoints, and export the profile as a shared template. Team members import this profile to align their VS Code environments.

For personal preferences that should not be shared, keep them out of the tracked rules entirely: put team rules in the committed .clinerules file and hold individual model choices or local credentials in your own VS Code user settings, which are never checked in. This keeps developers free to tune their own setup while the core team rules stay under version control.

Managing Context Windows and Token Spend

Adding rules to a workspace increases the size of the system prompt, which consumes tokens and affects model performance. The more of the context window a rules file consumes, the less reliably the model follows any single instruction in it. This effect, often called lost-in-the-middle, happens because LLMs attend more closely to tokens at the beginning and end of the context window and frequently neglect instructions buried in the middle of long threads.

To prevent this degradation and manage token expenses, teams must optimize their .clinerules content:

  • Keep Rules Modular: Focus on essential rules, coding standards, and safety bounds rather than copy-pasting entire framework manuals.
  • Use Conditional Instructions: Structure instructions to trigger only when specific files are active, keeping the baseline prompt small.
  • Control Chat History: Instruct the agent to close completed tasks and start new chat sessions rather than keeping a single chat running indefinitely, which clears out old conversation tokens.

Optimizing context windows prevents instruction amnesia and lowers API costs. By keeping rules modular and focused, teams ensure the model executes coding tasks accurately without wasting budget.

Integrating Remote Team Workspaces with Fast.io MCP

To scale agent workflows, teams must move past local file configurations and connect Cline to shared cloud environments. The Fast.io MCP server lets agents read and write workspace files, access structured document data, and coordinate with human team members. Fast.io exposes Streamable HTTP at the /mcp endpoint to allow agents to interact with files, folders, and metadata.

Unlike local packages that require local runtime setup, the Fast.io MCP server is a remote service. Connected agents interact with the workspace via the storage for agents endpoint, which exposes Streamable HTTP at the /mcp endpoint. To connect Cline to your shared workspace, configure the extension to connect to the remote server over Streamable HTTP by editing the cline_mcp_settings.json configuration file. This file is located in the extension's storage folder on your local machine:

  • macOS Location: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Windows Location: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

Add the remote Fast.io server configuration to the mcpServers object in the JSON file:

{
  "mcpServers": {
    "fastio": {
      "url": "https://mcp.fast.io/mcp/key",
      "type": "streamableHttp",
      "disabled": false,
      "headers": {
        "Authorization": "Bearer YOUR_FASTIO_API_KEY"
      }
    }
  }
}

Ensure that the "type" field is set to "streamableHttp". Cline uses this setting to establish a connection with the remote Fast.io API. Once configured, your local Cline agent can access the shared team workspaces, read version-controlled codebases, and write generated features directly to folders accessible by human developers.

Creating an account with Fast.io is free, while running collaborative projects requires an organization. Every organization starts with a 14-day free trial (credit card required) as detailed on our pricing page. Plans are Starter at 29 USD per month, Business at 99 USD per month, and Growth at 299 USD per month. An agent can sign up free, configure workspaces and folder structures, and then perform an ownership transfer to hand the organization over to a human manager. This cooperative setup allows teams to build cost-effective, versioned, and auditable agent environments.

Frequently Asked Questions

Where is the Cline rules file located in VS Code?

The workspace Cline rules file is named `.clinerules` and must be located at the root of the project workspace. When you open a folder in VS Code, Cline scans this root directory and appends the rules directly to its system prompt. Personal or global rules can also be configured in Cline's system-level config directory, such as `~/.agents/AGENTS.md` for cross-tool compatibility.

Can you sync .clinerules using VS Code Settings Sync?

No, VS Code Settings Sync only synchronizes user preferences, keyboard shortcuts, snippets, extension lists, and UI state. It does not synchronize files in your workspace, such as a `.clinerules` file. To sync rules across development environments, you should check the `.clinerules` file into Git version control so team members receive the rules when they pull from the repository.

How do you share .clinerules across team members?

The recommended way to share `.clinerules` is to commit the file to your project's Git repository. Ensure your `.gitignore` file is configured so it does not ignore the file. Developers pulling the latest changes will immediately have the rules active in their workspaces. To align extension configurations and model settings, teams can use VS Code Profiles to export and share configuration templates.

What is the recommended size limit for a .clinerules file?

To avoid context window overload and high API costs, keep your rules concise and modular. Since model performance begins to degrade once context usage exceeds 40% of the available window, focus the rules on tech stack configuration, naming standards, and safety boundaries rather than copy-pasting extensive reference manuals.

Related Resources

Fastio features

Sync Cline rules across team workspaces

Keep your development environment aligned by sharing your Cline rules in persistent, version-controlled workspaces. Start your 14-day trial today.